Automatically create FILESDIR if necessary when writing old style digests. Thanks...
authorZac Medico <zmedico@gentoo.org>
Tue, 4 Apr 2006 19:59:24 +0000 (19:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 4 Apr 2006 19:59:24 +0000 (19:59 -0000)
svn path=/main/trunk/; revision=3071

pym/portage_manifest.py

index e9f4a321f041419e7684251213cd53af3eb6e446..6881c924d74ee3d108efaef442d141c4f47c1bc2 100644 (file)
@@ -124,6 +124,13 @@ class Manifest(object):
                """ Create old style digest files for this Manifest instance """
                cpvlist = [os.path.join(self.pkgdir.rstrip(os.sep).split(os.sep)[-2], x[:-7]) for x in portage.listdir(self.pkgdir) if x.endswith(".ebuild")]
                rval = []
+               try:
+                       os.makedirs(os.path.join(self.pkgdir, "files"))
+               except OSError, oe:
+                       if oe.errno == errno.EEXIST:
+                               pass
+                       else:
+                               raise
                for cpv in cpvlist:
                        dname = os.path.join(self.pkgdir, "files", "digest-"+portage.catsplit(cpv)[1])
                        distlist = self._getCpvDistfiles(cpv)