Don't write empty (thin) Manifest files.
authorZac Medico <zmedico@gentoo.org>
Thu, 15 Sep 2011 02:21:45 +0000 (19:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 15 Sep 2011 02:21:45 +0000 (19:21 -0700)
With thin manifest, there's no need to have a Manifest file if there
are no DIST entries.

pym/portage/manifest.py

index 3f0aa932709c6bf070f2984ab4adbe132917fa31..32cc2c0257e297ed975a2cb12b932a71675e45d7 100644 (file)
@@ -257,7 +257,10 @@ class Manifest(object):
                                                                break
                                except (IOError, OSError) as e:
                                        if e.errno == errno.ENOENT:
-                                               pass
+                                               if not myentries:
+                                                       # With thin manifest, there's no need to have
+                                                       # a Manifest file if there are no DIST entries.
+                                                       update_manifest = False
                                        else:
                                                raise
                        if update_manifest: