Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38420 - (portage 2.0.50_pre16) TypeError: unmerge() takes at least 4 arguments (3 given)
Summary: (portage 2.0.50_pre16) TypeError: unmerge() takes at least 4 arguments (3 given)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-01-16 09:24 UTC by Matthew Kennedy (RETIRED)
Modified: 2004-02-08 17:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kennedy (RETIRED) gentoo-dev 2004-01-16 09:24:01 UTC
mkennedy@killr:~$ sudo ebuild /usr/portage/dev-lisp/sbcl/sbcl-0.8.7-r1.ebuild unmerge
Traceback (most recent call last):
  File "/usr/sbin/ebuild", line 42, in ?
    a=portage.doebuild(pargs[0],x,getroot(),tmpsettings,debug=debug,cleanup=cleanup)
  File "/usr/lib/portage/pym/portage.py", line 2024, in doebuild
    return unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot)
TypeError: unmerge() takes at least 4 arguments (3 given)
mkennedy@killr:~$
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2004-01-16 09:26:19 UTC
Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8,2.3.3_pre20031222-r0, 2.6.1-gentoo-r1)
=================================================================
System uname: 2.6.1-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.12
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/lib/jboss /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -funroll-loops -fprefetch-loop-arrays -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs digest noauto noclean notitles sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apm avi beep berkdb bonobo cdr cjk crypt cups ea-support emacs emacs-w3m encode esd foomaticdb gdbm gif gnome gtk gtk2 gtkhtml guile java jpeg libg++ libwww mad mikmod mmx motif mozilla moznocompose moznoirc moznomail mozxmlterm mpeg ncurses nptl oggvorbis opengl oss pam pdflib perl png postgres python quicktime readline sdl spell sse ssl tcltk tcpd tetex threads tiff truetype x86 xml2 xv zlib"
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-01-16 10:10:03 UTC
Pretty easily fixed by changeing 

return unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot)

into

return unmerge(mysettings["CATEGORY"],mysettings["PF"],myroot,mysettings)

I wonder about passing in the settings dict, then 2 specific values taken from settings; emerge's call to unmerge (@ line 1746) is the only instance I'm aware of where category/pf isn't stored in settings.
Either way, easy fix.
Comment 3 Derk W te Bokkel 2004-01-17 15:02:10 UTC
more unmerge of package failures .. now I've figured out how to blitz /var/db/pkg/sys-kernel/mm-sources-2.6.1-r1  manually but this should work.

looks like a real live bug .. by the way I'm also noticing that some packages get unmerged several times after being upgraded .. some of them are trying to be cleaned out for the third or fourth time .. seems their directories in /var/db/pkg are not getting deleted .. manually killing the directory seems to fix the problem but portage should do this automagicly.

the results of several tries ...

 emerge unmerge mm-sources-2.6.1-r1
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2194, in ?
    if 1==unmerge(myaction, myfiles):
  File "/usr/bin/emerge", line 1651, in unmerge
    mymatch=localtree.dep_match(x)
  File "/usr/lib/portage/pym/portage.py", line 3946, in dep_match
    mymatch=self.dbapi.match(mydep)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (sys-kernel/mm-sources-2.6.1-r1)'

 emerge unmerge mm-sources-2.6.1-r1.ebuild
 
!!! The path 'mm-sources-2.6.1-r1.ebuild' doesn't exist.


 emerge unmerge /sys-kernel/mm-sources/mm-sources-2.6.1-r1.ebuild
 
!!! The path '/sys-kernel/mm-sources/mm-sources-2.6.1-r1.ebuild' doesn't exist.

 mm-sources # emerge unmerge mm-sources-2.6.1-r1.ebuild
['', 'usr', 'portage', 'sys-kernel', 'mm-sources', 'mm-sources-2.6.1-r1.ebuild']/usr/portage/sys-kernel/mm-sources/mm-sources-2.6.1-r1.ebuild
 
!!! mm-sources-2.6.1-r1.ebuild is not inside /var/db/pkg; aborting.


emerge -pC mm-sources-2.6.1-r1
 
>>> These are the packages that I would unmerge:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2194, in ?
    if 1==unmerge(myaction, myfiles):
  File "/usr/bin/emerge", line 1651, in unmerge
    mymatch=localtree.dep_match(x)
  File "/usr/lib/portage/pym/portage.py", line 3946, in dep_match
    mymatch=self.dbapi.match(mydep)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (sys-kernel/mm-sources-2.6.1-r1)'

partial etcat -v portage result...

  sys-apps/portage-2.0.50_pre16 :
        [ ~I] 2.0.50_pre16 (0)

 emerge info
Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.1-mm4)
=================================================================
System uname: 2.6.1-mm4 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.3.12
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/bigdisk1/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acpi acpi4linux alsa apm arts avi berkdb bonobo cdr crypt cups dvd dvdr encode esd foomaticdb gb gdbm gif gnome gphoto2 gpm gtk gtk2 gtkhtml guile imagemagick imlib jack java javascript jpeg kde libg++ libgda libwww mad mikmod motif mozilla mpeg ncurses nls ofx oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline scanner sdl slang spell ssl svga tcpd transcode truetype usb v4l x86 xinerama xml xml2 xmms xv zlib"
Comment 4 Derk W te Bokkel 2004-01-17 15:10:50 UTC
Oh I for got to add .. /var/db/pkg/sys-kernel/mm-sources-2.6.1-r1 did exist ..

Is this perhaps a hidden permission problem? Portage (emerge ) isn't dropping permissions during this is it? It is running as root but why can it not find the files when they do exist?

Derk
Comment 5 Derk W te Bokkel 2004-01-17 16:19:33 UTC
I think this bug is more major than normal as if it's not fixed or manually dealt with your /var/db/pkg data base will be full of crap very quickly plus you are not able to cleanly remove applications..

for example: I'm running short of disk space .. I want to clean out kde-3.1.4 or kde-3.1.5 and leave the kde-3.2 beta alone .. it does not work at the moment ..

emerge unmerge -p kde-3.1.4   (or 3.1.5)
 
>>> These are the packages that I would unmerge:
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2194, in ?
    if 1==unmerge(myaction, myfiles):
  File "/usr/bin/emerge", line 1651, in unmerge
    mymatch=localtree.dep_match(x)
  File "/usr/lib/portage/pym/portage.py", line 3946, in dep_match
    mymatch=self.dbapi.match(mydep)
  File "/usr/lib/portage/pym/portage.py", line 3865, in match
    mymatch=match_from_list(mydep,self.cp_list(mykey))
  File "/usr/lib/portage/pym/portage.py", line 3258, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: 'Specific key requires an operator (kde-base/kde-3.1.4)'

this is just a simple example (which really does not remove all of kde ) maybe this is why some apps are not being cleaned as well?


Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2004-01-17 18:32:28 UTC
I just commited Brian's fix and fixed "emerge foo-1.2 unmerge" problem in cvs.
Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2004-01-19 13:19:20 UTC
KeyError: 'Specific key requires an operator (kde-base/kde-3.1.4)'

IS NOT RELATED TO THIS BUG
=kde-base/kde-3.1.4
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2004-02-08 17:55:25 UTC
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.