In fetch(), don't try to parse digests unless the "O" variable is defined. (trunk...
authorZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 13:17:52 +0000 (13:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 22 May 2007 13:17:52 +0000 (13:17 -0000)
svn path=/main/branches/2.1.2/; revision=6575

pym/portage.py

index 9a9b3bbf7af623c6fb18264235b9cccedf8bc236..0abaf312628ba01b806d167364861ca9f115eecd 100644 (file)
@@ -2313,8 +2313,13 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                if try_mirrors:
                        mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x]
 
-       mydigests = Manifest(
-               mysettings["O"], mysettings["DISTDIR"]).getTypeDigests("DIST")
+       pkgdir = mysettings.get("O")
+       if pkgdir:
+               mydigests = Manifest(
+                       pkgdir, mysettings["DISTDIR"]).getTypeDigests("DIST")
+       else:
+               # no digests because fetch was not called for a specific package
+               mydigests = {}
 
        fsmirrors = []
        for x in range(len(mymirrors)-1,-1,-1):