Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159638 - Emerge --sync end with UnboundLocalError. No further emerging possible
Summary: Emerge --sync end with UnboundLocalError. No further emerging possible
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2007-01-01 12:33 UTC by Wim van Dorst
Modified: 2007-01-02 15:12 UTC (History)
1 user (show)

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


Attachments
fix the UnboundLocalError in vartree.getprovide() (getprovide.patch,918 bytes, patch)
2007-01-01 17:34 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wim van Dorst 2007-01-01 12:33:20 UTC
On a long-time running system (one year uptime, no changes) I did a new emerge --sync, for an update spree. No emerging possible after this, not of ebuilds or of further syncs.

Repeatable output of  'emerge --sync' 

...normal text, upto 100% cache update... and then:

Check /var/db/pkg/sys-libs/libcap-1.10-r5/PROVIDE and USE.
Traceback (most recent call last):
  File "/usr/bin/emerge", line 5254, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 5211, in emerge_main
    action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/bin/emerge", line 3954, in action_sync
    mybestpv = portdb.xmatch("bestmatch-visible", "sys-apps/portage")
  File "/usr/lib/portage/pym/portage.py", line 5871, in xmatch
    mydep = dep_expand(origdep, mydb=self, settings=self.mysettings)
  File "/usr/lib/portage/pym/portage.py", line 4086, in dep_expand
    return prefix + cpv_expand(
  File "/usr/lib/portage/pym/portage.py", line 4250, in cpv_expand
    virts = settings.getvirtuals("/")
  File "/usr/lib/portage/pym/portage.py", line 1952, in getvirtuals
    self.treeVirtuals = map_dictlist_vals(getCPFromCPV,temp_vartree.get_all_provides())
  File "/usr/lib/portage/pym/portage.py", line 5291, in get_all_provides
    for mykey in self.get_provide(node):
  File "/usr/lib/portage/pym/portage.py", line 5283, in get_provide
    print "Possibly Invalid: " + str(mylines)
UnboundLocalError: local variable 'mylines' referenced before assignment
Comment 1 Wim van Dorst 2007-01-01 12:40:00 UTC
Environmental data:
* linux 2.6.11-gentoo-r6
* portage-2.1.2_rc4-r4
* python 2.3.5
Comment 2 Zac Medico gentoo-dev 2007-01-01 17:34:50 UTC
Created attachment 105119 [details, diff]
fix the UnboundLocalError in vartree.getprovide()

This patch will fix that UnboundLocalError exception.  Something else went wrong while loading the virtuals though.  You should get a warning message about that after the patch is applied.  If the patch is saved as /tmp/getprovide.patch, then it can be applied as follows:

cd /usr/lib/portage
patch -p0 < /tmp/getprovide.patch
Comment 3 Zac Medico gentoo-dev 2007-01-02 15:12:14 UTC
This has been released in 2.1.2_rc4-r5.