In fetch(), don't try to parse digests unless the "O" variable is defined.
authorZac Medico <zmedico@gentoo.org>
Sun, 20 May 2007 21:28:53 +0000 (21:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 20 May 2007 21:28:53 +0000 (21:28 -0000)
svn path=/main/trunk/; revision=6561

pym/portage/__init__.py

index f5843815860744e7062358afa8366a38a2f488b1..664f0a7d77ec7995709d857a1b27ec7613456b28 100644 (file)
@@ -2405,8 +2405,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):