Owh... So easy! Ok, next take on thatthebell wrote:Uncommenting lines 1971 and 1985 in the latest version would probably help.
Owh... So easy! Ok, next take on thatthebell wrote:Uncommenting lines 1971 and 1985 in the latest version would probably help.
I meant help by providing a bit more info. But I've worked out the problem in those two cases (I told you the virtual code might be flaky).neonik wrote:Owh... So easy! Ok, next take on that
Code: Select all
for p in others:
myprovide = vardbapi.aux_get(cpv, ["PROVIDE"])[0].split()
if mycp not in provide:
continueI understood that. I was gonna try debugging myself, but no need anymore.thebell wrote:I meant help by providing a bit more info.
Changing provide to myprovide solves the issue.Found revdep sys-apps/portage-2.0.51_pre20 for dev-lang/python-2.3.4
checking sys-apps/file-4.10
Checking atom virtual/libc
Checking atom virtual/python
Found revdep sys-apps/file-4.10 for dev-lang/python-2.3.4
checking sys-kernel/config-kernel-0.3.3
Checking atom virtual/python
Found revdep sys-kernel/config-kernel-0.3.3 for dev-lang/python-2.3.4
checking sys-libs/libcap-1.10-r4
Checking atom >=virtual/python-2.2.1
Traceback (most recent call last):
File "./emerge-rdep", line 2807, in ?
if 1==unmerge(myaction, myfiles):
File "./emerge-rdep", line 2166, in unmerge
myrdepgraph.create(y)
File "./emerge-rdep", line 2030, in create
self.create( mydep, cpv, 1 )
File "./emerge-rdep", line 2030, in create
self.create( mydep, cpv, 1 )
File "./emerge-rdep", line 2029, in create
for mydep in self.direct_revdeps(cpv):
File "./emerge-rdep", line 1987, in direct_revdeps
if self.parse_dep(myatom, cpv, myinstcpvs):
File "./emerge-rdep", line 1919, in parse_dep
if mycp not in provide:
NameError: global name 'provide' is not defined
Good. It was a stupid problem anyway.neonik wrote:Your patch v5 seems to solve the issue with both packages.
I though as much. You've got a package installed that depends on a specific version of a virtual package. I don't, so that branch never got executed on my system.Here the output of v4 with provide instead of myprovide (cut down up to the last reference):<snip>
checking sys-libs/libcap-1.10-r4
Checking atom >=virtual/python-2.2.1
Traceback (most recent call last):
<snip>
Great! If noone has any more problems with it, I might submit this to bugzilla.Edit: And trying to unmerge the entire system works now too. Great job, thebell.
Code: Select all
lostech bin # emerge -Cp xorg-x11
>>> These are the packages that I would unmerge:
Calculating reverse dependencies \Note: Empty target in string. (Deprecated)
--> svga? svga? []
Note: Empty target in string. (Deprecated)
--> X? X? []
Note: Empty target in string. (Deprecated)
--> svga? svga? []
Note: Empty target in string. (Deprecated)
--> X? X? []
Traceback (most recent call last):
File "/usr/bin/emerge", line 2815, in ?
if 1==unmerge(myaction, myfiles):
File "/usr/bin/emerge", line 2170, in unmerge
myrdepgraph.create(y)
File "/usr/bin/emerge", line 2029, in create
self.create( mydep, cpv, 1 )
File "/usr/bin/emerge", line 2028, in create
for mydep in self.direct_revdeps(cpv):
File "/usr/bin/emerge", line 1986, in direct_revdeps
if self.parse_dep(myatom, cpv, myinstcpvs):
File "/usr/bin/emerge", line 1928, in parse_dep
if not cpv_satisfies_dep(cpv, atom):
File "/usr/bin/emerge", line 1827, in cpv_satisfies_dep
return ( len(portage.match_from_list(atom, [cpv])) > 0 )
File "/usr/lib/portage/pym/portage.py", line 4031, in match_from_list
cat,pkg = catsplit(mycpv)
ValueError: unpack list of wrong sizeCode: Select all
lostech bin # emerge -Cp gtk+
>>> These are the packages that I would unmerge:
Calculating reverse dependencies \Traceback (most recent call last):
File "/usr/bin/emerge", line 2815, in ?
if 1==unmerge(myaction, myfiles):
File "/usr/bin/emerge", line 2170, in unmerge
myrdepgraph.create(y)
File "/usr/bin/emerge", line 2028, in create
for mydep in self.direct_revdeps(cpv):
File "/usr/bin/emerge", line 1986, in direct_revdeps
if self.parse_dep(myatom, cpv, myinstcpvs):
File "/usr/bin/emerge", line 1928, in parse_dep
if not cpv_satisfies_dep(cpv, atom):
File "/usr/bin/emerge", line 1827, in cpv_satisfies_dep
return ( len(portage.match_from_list(atom, [cpv])) > 0 )
File "/usr/lib/portage/pym/portage.py", line 4031, in match_from_list
cat,pkg = catsplit(mycpv)
ValueError: unpack list of wrong sizethebell wrote:Uncommenting lines 1971 and 1985 in the latest version would probably help.
Code: Select all
lostech root # emerge -Cpv gtk+
>>> These are the packages that I would unmerge:
Calculating reverse dependencies \checking app-admin/gkrellm-2.2.2
Checking atom >=sys-apps/sed-4
Checking atom dev-libs/openssl
Checking atom >=x11-libs/gtk+-2.0.5
checking app-cdr/gcombust-0.1.55
Checking atom =x11-libs/gtk+-1.2*
Checking atom sys-devel/gettext
Checking atom app-cdr/cdrtools
checking app-editors/bluefish-0.12
Checking atom >=x11-libs/gtk+-2
checking app-i18n/uim-0.4.1
Checking atom virtual/x11
Checking atom >=x11-libs/gtk+-2
checking app-pda/jpilot-0.99.6-r1
Checking atom >=x11-libs/gtk+-2
checking app-pda/plucker-1.8-r1
Checking atom >=dev-lang/python-1.5.2
Checking atom >=x11-libs/gtk+-2.2
checking app-sci/tilp-6.09
Checking atom dev-libs/libticables
Checking atom dev-libs/libticalcs
Checking atom dev-libs/libtifiles
Checking atom =x11-libs/gtk+-1.2*
checking app-text/gtkspell-2.0.4-r1
Checking atom >=x11-libs/gtk+-2
checking dev-perl/gtk-perl-0.7008-r10
Checking atom media-libs/gdk-pixbuf
Checking atom =x11-libs/gtk+-1.2*
Checking atom dev-perl/XML-Writer
Checking atom dev-perl/XML-Parser
checking dev-python/wxpython-2.4.2.4
Checking atom >=dev-lang/python-2.1
Checking atom >=x11-libs/wxGTK-2.4.2
Checking atom >=x11-libs/gtk+-2.0
checking dev-python/pygtk-2.0.0-r1
Checking atom >=dev-lang/python-2.2
Checking atom >=x11-libs/pango-1
Checking atom >=x11-libs/gtk+-2
checking dev-util/anjuta-1.2.2-r1
Checking atom >=dev-libs/glib-2.0.6
Checking atom >=x11-libs/gtk+-2.0.8
checking games-emulation/epsxe-1.6.0-r3
Checking atom >=dev-libs/glib-1.2
Checking atom =x11-libs/gtk+-1.2*
Checking atom =sys-libs/ncurses-5*
Checking atom =sys-libs/zlib-1*
Checking atom net-misc/wget
Checking atom games-emulation/psemu-peopsspu
checking games-emulation/psemu-peopsspu-1.0.7-r1
Checking atom app-arch/unzip
Checking atom =x11-libs/gtk+-1*
Checking atom sys-devel/automake
checking games-util/xqf-0.9.13
Checking atom >=games-util/qstat-25
Checking atom :
Traceback (most recent call last):
File "/usr/bin/emerge", line 2815, in ?
if 1==unmerge(myaction, myfiles):
File "/usr/bin/emerge", line 2170, in unmerge
myrdepgraph.create(y)
File "/usr/bin/emerge", line 2028, in create
for mydep in self.direct_revdeps(cpv):
File "/usr/bin/emerge", line 1986, in direct_revdeps
if self.parse_dep(myatom, cpv, myinstcpvs):
File "/usr/bin/emerge", line 1928, in parse_dep
if not cpv_satisfies_dep(cpv, atom):
File "/usr/bin/emerge", line 1827, in cpv_satisfies_dep
return ( len(portage.match_from_list(atom, [cpv])) > 0 )
File "/usr/lib/portage/pym/portage.py", line 4031, in match_from_list
cat,pkg = catsplit(mycpv)
ValueError: unpack list of wrong sizeFirst you have to create a directory where you put the binary executable /usr/bin/emerge:fctk wrote:sorry but... i'm a noob and don't know how i can patch portage with the .diff file... i'd really want to test this...
i downloaded the diff and upgraded portage to 51-pre20 and now? thx
Code: Select all
$ mkdir ~/portage/Code: Select all
$ cd ~/portage/ && wget http://graphit.sourceforge.net/misc/emerge-unmerge-rdep-v5.diffCode: Select all
$ cp /usr/bin/emerge ./Code: Select all
$ patch -b ./emerge -i emerge-unmerge-rdep-v5.diffWhich I don't consider normal. I'm no portage developer, but I believe thebell should have a solution.!!! Problem in games-util/qstat-25 dependencies.
!!!
Traceback (most recent call last):
File "/usr/bin/emerge", line 2739, in ?
retval,favorites=mydepgraph.select_files(myfiles)
File "/usr/bin/emerge", line 997, in select_files
print "!!!",e.value,e.__module__
AttributeError: KeyError instance has no attribute 'value'
Code: Select all
bash-2.05b$ patch -p1 -b ./emerge -i emerge-unmerge-rdep-v5.diff
missing header for unified diff at line 3 of patch
patching file ./emergeCode: Select all
$ cd ~/portage/ ; mv ./emerge.orig ./emerge ; patch -b -i emerge-unmerge-rdep-v5.diffYah, I noticed that the package didn't exist. I did try copying the 2.5c ebuild naming it 25c (since it seems to be that). However, it still failed.neonik wrote:>=games-util/qstat-25
There's no such package, actually. There's a games-util/qstat-2.6 and games-util/qstat-2.5c in the tree, but nothing like games-util/qstat-25. Trying to emerge it, which should normally give an error message saying you should append a '=', it outputs this error message:Which I don't consider normal. I'm no portage developer, but I believe thebell should have a solution.!!! Problem in games-util/qstat-25 dependencies.
!!!
Traceback (most recent call last):
File "/usr/bin/emerge", line 2739, in ?
retval,favorites=mydepgraph.select_files(myfiles)
File "/usr/bin/emerge", line 997, in select_files
print "!!!",e.value,e.__module__
AttributeError: KeyError instance has no attribute 'value'
At the first sight it's a broken dependency, i.e. either a typing mistake or the package was renamed/deleted.
Code: Select all
!!! aux_get(): ebuild for 'games-util/qstat-25c' does not exist at:
!!! NoneCode: Select all
cp /usr/bin/emerge .
patch emerge <emerge-unmerge-rdep-v<n>.diffCode: Select all
patch emerge <emerge-unmerge-rdep-v5.diff
patching file emerge
Hunk #1 FAILED at 11.
Hunk #2 succeeded at 31 (offset -4 lines).
Hunk #3 succeeded at 1655 (offset -165 lines).
Hunk #4 succeeded at 1952 (offset -168 lines).
Hunk #5 succeeded at 1984 with fuzz 2 (offset -168 lines).
Hunk #6 FAILED at 1996.
Hunk #7 succeeded at 2019 (offset -175 lines).
2 out of 7 hunks FAILED -- saving rejects to file emerge.rej
Code: Select all
% cat emerge.rej
***************
*** 11,17 ****
from stat import *
from output import *
- import portage
import portage_util
import portage_locks
import portage_exception
--- 11,17 ----
from stat import *
from output import *
+ import portage, portage_dep
import portage_util
import portage_locks
import portage_exception
***************
*** 1772,1778 ****
print yellow("\a!!! This could be damaging to your system.\n")
if "--pretend" not in myopts:
countdown(10,red("Press Ctrl-C to Stop"))
-
else:
#unmerge_action in ["prune", clean"]
slotmap={}
--- 1996,2006 ----
print yellow("\a!!! This could be damaging to your system.\n")
if "--pretend" not in myopts:
countdown(10,red("Press Ctrl-C to Stop"))
+ else:
+ # Add this package to the revdepgraph.
+ for y in mymatch:
+ myrdepgraph.create(y)
+
else:
#unmerge_action in ["prune", clean"]
slotmap={}
It worked last time I tried it, but it hasn't been updated to the latest portage versions, so it might not now. I doubt I'll be updating it any further either, since jstubbs is working on a completely new dependency engine for portage-2.1 which will make this unnecessary.JOS654 wrote:Hi is this project alive yet? i would like to help testing
btw thanks for your work