Merged from trunk 6036:6039
authorFabian Groffen <grobian@gentoo.org>
Mon, 26 Feb 2007 21:40:18 +0000 (21:40 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 26 Feb 2007 21:40:18 +0000 (21:40 -0000)
Fix "NameError: global name 'myfilelist' is not defined" when
collision-protect is enabled.

Make sure that ${A} in initialized in case pkg_nofetch() needs to be
called.  Thanks to Peper for reporting.

svn path=/main/branches/prefix/; revision=6082

pym/portage/__init__.py
pym/portage/dbapi/vartree.py

index fb705e19986a4dbe776f2888660787bc05a3e329..54181b74605381ab2d90caa3b4f48cdf4af3d0fc 100644 (file)
@@ -2666,6 +2666,7 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
                                                        mysettings=fetch_settings)
                                                myuris = [uri for uri in alluris \
                                                        if os.path.basename(uri) == myfile]
+                                               fetch_settings["A"] = myfile # for use by pkg_nofetch()
                                                if fetch(myuris, fetch_settings):
                                                        success = True
                                                        break
index fb33931f7ebd85ebdc008849ed16edb56c7b815d..2db939b82f86d7b5436a6e3cc4436cd327e72d7d 100644 (file)
@@ -1286,8 +1286,8 @@ class dblink(object):
 
                        collisions = []
 
-                       print green("*")+" checking "+str(len(myfilelist))+" files for package collisions"
-                       for f in myfilelist:
+                       print green("*")+" checking "+str(len(mycontents))+" files for package collisions"
+                       for f in mycontents:
                                nocheck = False
                                # listdir isn't intelligent enough to exclude symlinked dirs,
                                # so we have to do it ourself