Move mf.create out of a loop because it should only need to be called once.
authorZac Medico <zmedico@gentoo.org>
Sun, 9 Apr 2006 04:50:41 +0000 (04:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 9 Apr 2006 04:50:41 +0000 (04:50 -0000)
svn path=/main/trunk/; revision=3104

pym/portage.py

index 00d87dbd60e84ff25c18be109808e115e6b73381..dc8f2c0b78e4402c3b185616038aaefc6215c5dd 100644 (file)
@@ -2073,6 +2073,7 @@ def digestgen(myarchives,mysettings,db=None,overwrite=1,manifestonly=0):
                db = portagetree().dbapi
 
        mf = Manifest(mysettings["O"], db, mysettings)
+       mf.create(assumeDistfileHashes=True)
        for f in myarchives:
                # the whole type evaluation is only for the case that myarchives isn't a 
                # DIST file as create() determines the type on its own
@@ -2085,7 +2086,6 @@ def digestgen(myarchives,mysettings,db=None,overwrite=1,manifestonly=0):
                if myrealtype != None:
                        mytype = myrealtype
                writemsg(">>> Creating Manifest for %s\n" % mysettings["O"])
-               mf.create(assumeDistfileHashes=True)
                try:
                        writemsg(">>> Adding digests for file %s\n" % f)
                        mf.updateFileHashes(mytype, f, checkExisting=False, reuseExisting=not os.path.exists(os.path.join(mysettings["DISTDIR"], f)))