summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-17 21:32:43 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-17 21:32:43 +0000
commit0fd14d64fd3b59d735f730e66a1da0d0255c5a14 (patch)
treedd2365f2455961697e284f6e8511cc8e344331a7
parent556c2b1a88e0e47421f1f4b6826ecac372913ad2 (diff)
downloadportage-0fd14d64fd3b59d735f730e66a1da0d0255c5a14.tar.gz
portage-0fd14d64fd3b59d735f730e66a1da0d0255c5a14.tar.bz2
portage-0fd14d64fd3b59d735f730e66a1da0d0255c5a14.zip
Make empty digest-* files 0 bytes instead of 1 byte. Thanks to Sven Wegener for reporting this.
svn path=/main/trunk/; revision=4743
-rw-r--r--pym/portage_manifest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py
index aa6f0c015..1266e33df 100644
--- a/pym/portage_manifest.py
+++ b/pym/portage_manifest.py
@@ -252,8 +252,12 @@ class Manifest(object):
else:
raise
if update_digest:
- write_atomic(dname,
- "\n".join(self._createDigestLines1(distlist, self.fhashdict))+"\n")
+ mylines = self._createDigestLines1(distlist, self.fhashdict)
+ if mylines:
+ mylines = "\n".join(mylines) + "\n"
+ else:
+ mylines = ""
+ write_atomic(dname, mylines)
rval.append(dname)
return rval