Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289068 - app-portage/autounmask-0.27 stack trace (possibly related to portage 2.2_rc46)
Summary: app-portage/autounmask-0.27 stack trace (possibly related to portage 2.2_rc46)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 288499
  Show dependency tree
 
Reported: 2009-10-14 16:27 UTC by Matthew Gregory Sr.
Modified: 2010-09-04 08:43 UTC (History)
0 users

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


Attachments
fix KeyError: USE (use_keyerror.patch,594 bytes, patch)
2009-10-16 17:45 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Gregory Sr. 2009-10-14 16:27:14 UTC
I recently (Oct 13th) updated portage to version 2.2_rc46 (I was previously using 2.2_rc33).

Today I went to use autounmask to check what would have to be unmasked in order to upgrade wxGTK-2.8.10.1-r3 (autounmask -p x11-libs/wxGTK-2.8.10.1-r3) when I got this stack trace from python:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1447, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 320, in action_build
    mydepgraph.display_problems()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 4622, in display_problems
    self._show_unsatisfied_dep(*pargs, **kwargs)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 2158, in _show_unsatisfied_dep
    have_eapi_mask = show_masked_packages(masked_packages)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 5347, in show_masked_packages
    cpv, metadata)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 3054, in _getMissingLicenses
    use = metadata["USE"].split()
KeyError: 'USE'
 * Restoring files.
 * done!

While I know python relatively well, I do not know the portage internals at all.  I am rather surprised by this however since I was using only a slightly older RC before this latest update.  I would think it unlikely that the USE metadata would change a great deal in portage between RC 33 and RC 46.  That is only 13 bugfix updates later, and a change to the available metadata would probably be considered a major change, not a minor one.

So, rather than spend a lot of time on this I merely attempted to verify this error on a package I know autounamsk worked on before: app-emulation/wine-doors...

mythtv mgregory # autounmask -p app-emulation/wine-doors-0.1.3

 autounmask version 0.27 (using PortageXS-0.02.09 and portage-2.2_rc46)

 * Using repositories:
     /usr/portage
     
     /usr/local/portage/layman/gnome
     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords
 * Using package.unmask file: /etc/portage/package.unmask
 * Using package.use file: /etc/portage/package.use

 * Unmasking app-emulation/wine-doors-0.1.3 and its dependencies.. this might take a while..

 * Restoring files.
 * done!

Since that worked ok, i then went in and checked for USE flag related differences between x11-libs/wxGTK and app-emulation/wine-doors...

Difference: 

wine-doors-0.1.3 has an IUSE="" line, while wxGTK-2.8.10.1-r1/r3 have IUSE="X doc debug gnome gstreamer odbc opengl pch sdl".  So, I decided to see what happenes if I add a use flag to wine-doors...

what I did (basically added a python use flag to a package that autounmask is known to work with in order to do a quick test...)

mythtv mgregory # cp -v /usr/portage/app-emulation/wine-doors/wine-doors-0.1.3.ebuild /usr/portage/app-emulation/wine-doors/wine-doors-0.1.3.ebuild.bkup && sed -i -e 's/^IUSE=""/IUSE="python"/' /usr/portage/app-emulation/wine-doors/wine-doors-0.1.3.ebuild           
`/usr/portage/app-emulation/wine-doors/wine-doors-0.1.3.ebuild' -> `/usr/portage/app-emulation/wine-doors/wine-doors-0.1.3.ebuild.bkup'
mythtv mgregory # cd /usr/portage/app-emulation/wine-doors/
mythtv wine-doors # cp -v Manifest Manifest.bak
`Manifest' -> `Manifest.bak'
mythtv wine-doors # ls
ChangeLog  Manifest  Manifest.bak  metadata.xml  wine-doors-0.1.3.ebuild  wine-doors-0.1.3.ebuild.bkup
mythtv wine-doors # cp -v metadata.xml metadata.xml.bak
`metadata.xml' -> `metadata.xml.bak'
mythtv wine-doors # ebuild wine-doors-0.1.3.ebuild digest
>>> Creating Manifest for /usr/portage/app-emulation/wine-doors
mythtv wine-doors # autounmask -p app-emulation/wine-doors-0.1.3      

 autounmask version 0.27 (using PortageXS-0.02.09 and portage-2.2_rc46)

 * Using repositories:
     /usr/portage
     
     /usr/local/portage/layman/gnome
     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords
 * Using package.unmask file: /etc/portage/package.unmask
 * Using package.use file: /etc/portage/package.use

 * Unmasking app-emulation/wine-doors-0.1.3 and its dependencies.. this might take a while..

 * Restoring files.
 * done!

Since that produced no issues, I am at a loss without much more additional work, which I think is best to defer to the author(s)/maintainer(s).



Reproducible: Always

Steps to Reproduce:
1. Attempt to use autounmask (pretend is fine) with x11-libs/wxGTK-2.8.10.1-r3.  Portage version 2.2_rc46 *may* be required as well, but I have not tested this.
2. You should get a stack trace reporting a KeyError on the metadata dictionary for the keyword 'USE'
3. Come back here and tell us about it :-)
Actual Results:  
KeyError on 'USE' key for the portage "metadata" dictionary (or list, I haven't viewed the source yet).  

Expected Results:  
a list of what must be unmasked to enable x11-libs/wxGTK-2.8.10.1-r3
Comment 1 Sebastian Luther (few) 2009-10-16 06:59:13 UTC
This looks like a bug in portage. The trace shows emerge dying.
Comment 2 Zac Medico gentoo-dev 2009-10-16 17:45:06 UTC
Created attachment 207339 [details, diff]
fix KeyError: USE

If this patch is saved as /tmp/use_keyerror.patch, then it can be applied as follows:

  patch /usr/lib/portage/pym/_emerge/depgraph.py /tmp/use_keyerror.patch
Comment 3 Zac Medico gentoo-dev 2009-10-31 04:38:14 UTC
This is fixed in 2.1.7.2 and 2.2_rc47.