Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74990 - portage: emerge gives traceback when using --ask and --resume together
Summary: portage: emerge gives traceback when using --ask and --resume together
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2004-12-19 16:46 UTC by Harm Geerts
Modified: 2005-12-28 23:13 UTC (History)
2 users (show)

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


Attachments
Fix for the problem, removes sneakly --verbose (emerge-verbose-resume.patch,397 bytes, patch)
2005-11-27 13:34 UTC, Alec Warner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harm Geerts 2004-12-19 16:46:30 UTC
--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)
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2005-01-10 18:17:23 UTC
--resume should be the only thing on the command line anyway.
Comment 2 Dave Shanker 2005-03-11 18:46:05 UTC
Can a more "user friendly" error be printed out instead of traceback?
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-04-15 05:40:58 UTC
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.
Comment 4 Christoph Probst 2005-11-27 11:35:34 UTC
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)
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-11-27 13:03:29 UTC
(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'
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-11-27 13:34:56 UTC
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.
Comment 7 Jason Stubbs (RETIRED) gentoo-dev 2005-11-27 15:30:12 UTC
I'm part of dev-portage to which this bug is assigned, so CC'ing isn't needed. 
Comment 8 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-12-27 19:21:34 UTC
This was released in portage-2.1_pre1