To ease transition while Manifest 1 is being removed, only require hashes that will...
authorZac Medico <zmedico@gentoo.org>
Sun, 21 Jan 2007 07:22:54 +0000 (07:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 21 Jan 2007 07:22:54 +0000 (07:22 -0000)
svn path=/main/branches/2.1.2/; revision=5747

pym/portage.py

index 432227ca7d0f0f4faba2f1bf59847f153fd8da82..7ead873272872b24d748a39b94a9877ba21ccd42 100644 (file)
@@ -2676,10 +2676,12 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
                                distfiles_map.setdefault(myfile, []).append(cpv)
                mf = Manifest(mysettings["O"], mysettings["DISTDIR"],
                        fetchlist_dict=fetchlist_dict)
-               required_hash_types = set(portage_const.MANIFEST1_HASH_FUNCTIONS)
-               # Don't require MANIFEST2 hashes since that can trigger excessive
-               # fetches when sufficient digests already exist.
-               #required_hash_types.update(portage_const.MANIFEST2_HASH_FUNCTIONS)
+               # Don't require all hashes since that can trigger excessive
+               # fetches when sufficient digests already exist.  To ease transition
+               # while Manifest 1 is being removed, only require hashes that will
+               # exist before and after the transition.
+               required_hash_types = set(portage_const.MANIFEST1_HASH_FUNCTIONS
+                       ).intersection(portage_const.MANIFEST2_HASH_FUNCTIONS)
                required_hash_types.add("size")
                dist_hashes = mf.fhashdict.get("DIST", {})
                missing_hashes = set()