--ask and --resume don't go well together. I usually forget to remove -a so I see this error a lot. doesn't matter which package as long as there is something to resume. # emerge xchat-xsys glibc Calculating dependencies ...done! >>> emerge (1 of 2) net-irc/xchat-xsys-1.9.0 to / >>> md5 src_uri ;-) xsys-1.9.0.tar.bz2 >>> Unpacking source... >>> Unpacking xsys-1.9.0.tar.bz2 to /var/tmp/portage/xchat-xsys-1.9.0/work >>> Source unpacked. Caught signal 2 in pid 1204 Exiting on signal 2 manuel ~ # emerge xchat-xsys glibc -ask --resume These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 2963, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1510, in display now_use=self.applied_useflags[x[2]] KeyError: 'net-irc/xchat-xsys-1.9.0' Reproducible: Always Steps to Reproduce: 1. 2. 3. # emerge -V Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.4.28-mh1 i686)
--resume should be the only thing on the command line anyway.
Can a more "user friendly" error be printed out instead of traceback?
You have emerge aliased to 'emerge -v', yes? The traceback you are getting only happens with both --verbose and --resume in conjunction with --pretend or --ask. This is has been fixed prior to 2.0.51.19 by removing --verbose when using --resume.
This problem still exists with the latest version of emerge. --ask in conjuction with --resume results in a traceback! I haven't aliased emerge. sirona ~ # /usr/bin/emerge --ask --resume These are the packages that I would merge, in order: Traceback (most recent call last): File "/usr/bin/emerge", line 3155, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1578, in display now_use=self.applied_useflags[x[2]] KeyError: 'dev-perl/DBD-mysql-3.0002_p3' sirona ~ # emerge -V Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r3, 2.6.13- suspend2-r4 i686) I added Jason to the CCs as it sounded like me might look into this (see his last comment on this bug, 2005-04-15)
(In reply to comment #4) > This problem still exists with the latest version of emerge. --ask in conjuction > with --resume results in a traceback! I haven't aliased emerge. > > > sirona ~ # /usr/bin/emerge --ask --resume > > These are the packages that I would merge, in order: > > Traceback (most recent call last): > File "/usr/bin/emerge", line 3155, in ? > mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) > File "/usr/bin/emerge", line 1578, in display > now_use=self.applied_useflags[x[2]] > KeyError: 'dev-perl/DBD-mysql-3.0002_p3' > > > sirona ~ # emerge -V > Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r3, 2.6. 13- > suspend2-r4 i686) > > > I added Jason to the CCs as it sounded like me might look into this (see his > last comment on this bug, 2005-04-15) --verbose is still pruned in rc7 however the bug is still triggered somehow. Setting emerge to print out myopts right before the tb it looks like verbose is being inject into myopts at some point, I will spend some time today figuring out where. localhost bin # emerge --verbose --resume --ask * --verbose is currently broken with --resume. Disabling... These are the packages that I would merge, in order: ['--verbose', '--buildpkg', '--resume', '--ask'] Traceback (most recent call last): File "/usr/bin/emerge", line 3156, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1579, in display now_use=self.applied_useflags[x[2]] KeyError: 'sys-apps/man-pages-2.11' localhost bin # emerge --resume --ask These are the packages that I would merge, in order: ['--verbose', '--buildpkg', '--resume', '--ask'] Traceback (most recent call last): File "/usr/bin/emerge", line 3156, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1579, in display now_use=self.applied_useflags[x[2]] KeyError: 'sys-apps/man-pages-2.11' localhost bin # Apparently also triggered with emerge --resume --pretend localhost bin # emerge --resume --pretend These are the packages that I would merge, in order: ['--verbose', '--buildpkg', '--resume', '--pretend'] Traceback (most recent call last): File "/usr/bin/emerge", line 3193, in ? mydepgraph.display(portage.mtimedb["resume"]["mergelist"]) File "/usr/bin/emerge", line 1579, in display now_use=self.applied_useflags[x[2]] KeyError: 'sys-apps/man-pages-2.11'
Created attachment 73691 [details, diff] Fix for the problem, removes sneakly --verbose Basically one does an emerge -pv world, then control C's it. Emerge will store the options in mtimedb. Thus --verbose gets stuck in there. Then you emerge --resume {--pretend,--ask} it and it loads the options from the mtimedb. Of course this pulls in --verbose, but only if you used it in the original emerge command. This patches filters verbose from the mtimedb loaded options. Fixes the issue locally for me.
I'm part of dev-portage to which this bug is assigned, so CC'ing isn't needed.
This was released in portage-2.1_pre1