For bug #178293, don't write digest-* files unnecessarily when SRC_URI is empty....
authorZac Medico <zmedico@gentoo.org>
Sun, 13 May 2007 21:35:38 +0000 (21:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 13 May 2007 21:35:38 +0000 (21:35 -0000)
svn path=/main/branches/2.1.2/; revision=6536

pym/portage_manifest.py

index aed465d46287c1e6d4dbbd9bed6899661d5dfed0..761937b39021ff447f5cb61e2d8a7439cb411af5 100644 (file)
@@ -235,8 +235,11 @@ class Manifest(object):
                                        f = open(dname, "r")
                                        old_data = self._parseDigests(f)
                                        f.close()
-                                       if len(old_data) == 1 and "DIST" in old_data:
-                                               new_data = self._getDigestData(distlist)
+                                       new_data = self._getDigestData(distlist)
+                                       if not old_data and not new_data:
+                                               # SRC_URI is empty
+                                               update_digest = False
+                                       elif len(old_data) == 1 and "DIST" in old_data:
                                                if "DIST" in new_data:
                                                        for myfile in new_data["DIST"]:
                                                                for hashname in \