V 2,5 has a problem with dependents command

5 views
Skip to first unread message

Bob

unread,
Apr 17, 2012, 5:02:22 PM4/17/12
to wajig
I found a problem with the dependents command today. It was in the
2.5~pre release and also in 2.5. Here is the output of the command:


wajig> -V
wajig 2.5
wajig> dependents xserver-xorg-core
Traceback (most recent call last):
File "/usr/share/wajig/wajig.py", line 858, in <module>
main()
File "/usr/share/wajig/wajig.py", line 854, in main
result.func(result)
File "/usr/share/wajig/commands.py", line 188, in dependents
util.extract_dependencies(other_package, dependency_type):
File "/usr/share/wajig/util.py", line 239, in extract_dependencies
for dependency_list in
package.candidate.get_dependencies(dependency_type):
AttributeError: 'NoneType' object has no attribute 'get_dependencies'
wajig>


...bob

Tshepang Lekhonkhobe

unread,
Apr 18, 2012, 4:39:22 AM4/18/12
to wa...@googlegroups.com
That is strange and should not happen. I even fail to reproduce.
What's Debian suite do you use?

> --
> You received this message because you are subscribed to the Google Groups "wajig" group.
> To post to this group, send email to wa...@googlegroups.com.
> To unsubscribe from this group, send email to wajig+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/wajig?hl=en.
>

Bob

unread,
Apr 18, 2012, 1:33:27 PM4/18/12
to wajig
I am running testing ... updated about a week ago.

I got wajig from the "hg clone https://code.google.com/p/wajig/"
command a few days ago and installed from the deb file produced by the
"debuild -us -uc -b" command.

Also:
wajig> policy python
python:
Installed: 2.7.2-10
Candidate: 2.7.2-10
Version table:
*** 2.7.2-10 0
500 http://http.us.debian.org/debian/ testing/main i386
Packages
100 /var/lib/dpkg/status



...bob

Tshepang Lekhonkhobe

unread,
Apr 18, 2012, 2:35:20 PM4/18/12
to wa...@googlegroups.com
Can you run this python script. If all is good, it should not give
output at all:

import apt
cache = apt.cache.Cache()
for key in cache.keys():
if cache.is_virtual_package(key):
print(cache.get_providing_packages(key))

PS:
> it's easier to follow
>> why?
>>> please bottom-post

Bob

unread,
Apr 18, 2012, 6:28:01 PM4/18/12
to wajig
I copied the script to a file (t.py) and ran it by the "python t.py"
command. There was no output. To be sure things were working I put in
a Print("Hellow") statement and that is all that printed.

...bob


On Apr 18, 2:35 pm, Tshepang Lekhonkhobe <tshep...@gmail.com> wrote:
> Can you run this python script. If all is good, it should not give
> output at all:
>
> import apt
> cache = apt.cache.Cache()
> for key in cache.keys():
>     if cache.is_virtual_package(key):
>         print(cache.get_providing_packages(key))
>
> PS:
>
>
>
>
>
>
>
> > it's easier to follow
> >> why?
> >>> please bottom-post
> On Wed, Apr 18, 2012 at 19:33, Bob <bobrwe...@gmail.com> wrote:
> > I am running testing ... updated about a week ago.
>
> > I got wajig from the "hg clonehttps://code.google.com/p/wajig/"
> > command a few days ago and installed from the deb file produced by the
> > "debuild -us -uc -b" command.
>
> > Also:
> > wajig> policy python
> > python:
> >  Installed: 2.7.2-10
> >  Candidate: 2.7.2-10
> >  Version table:
> >  *** 2.7.2-10 0
> >        500http://http.us.debian.org/debian/testing/main i386

Tshepang Lekhonkhobe

unread,
Apr 19, 2012, 6:25:00 AM4/19/12
to wa...@googlegroups.com
On Thu, Apr 19, 2012 at 00:28, Bob <bobr...@gmail.com> wrote:
> I copied the script to a file (t.py) and ran it by the "python t.py"
> command.  There was no output. To be sure things were working I put in
> a Print("Hellow") statement and that is all that printed.

this is mysterious to me; I can't reproduce it

Tshepang Lekhonkhobe

unread,
Apr 19, 2012, 12:09:33 PM4/19/12
to wa...@googlegroups.com
On Thu, Apr 19, 2012 at 00:28, Bob <bobr...@gmail.com> wrote:
> I copied the script to a file (t.py) and ran it by the "python t.py"
> command.  There was no output. To be sure things were working I put in
> a Print("Hellow") statement and that is all that printed.

Can you apply the attached patch, then run it, and tell me what the output is:

$ cd wajig/
$ hg import --no-commit test.diff
$ python3 src/wajig.py dependents xserver-xorg-core

test.diff

Bob

unread,
Apr 19, 2012, 1:48:26 PM4/19/12
to wajig
OK I went to the hg (renamed wajig25) directory (created after I ran
"hg clone https://wajig.googlecode.com/hg" on April 16) and ran these
commands after saving the test.diff file there:

bob@bob ~/src/wajig25 $ hg import --no-commit test.diff
applying test.diff

bob@bob ~/src/wajig25 $ python3 src/wajig.py dependents xserver-xorg-
core
Traceback (most recent call last):
File "src/wajig.py", line 858, in <module>
main()
File "src/wajig.py", line 854, in main
result.func(result)
File "/home/bob/src/wajig25/src/commands.py", line 190, in
dependents
util.extract_dependencies(other_package, dependency_type):
File "/home/bob/src/wajig25/src/util.py", line 239, in
extract_dependencies
for dependency_list in
package.candidate.get_dependencies(dependency_type):
AttributeError: 'NoneType' object has no attribute 'get_dependencies'


The file date on src/commands.py was set to the current time so it
looks like the hg import command worked. Do I have the most current
version since I ran "hg clone https://wajig.googlecode.com/hg" on
April 16?


...bob

On Apr 19, 12:09 pm, Tshepang Lekhonkhobe <tshep...@gmail.com> wrote:
>  test.diff
> < 1KViewDownload
Reply all
Reply to author
Forward
0 new messages