diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-03-27 03:08:03 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-03-27 03:08:03 +0000 |
commit | 28967e6e154ccc0f2606df12a23efb50dffaa083 (patch) | |
tree | 0e2bb3148e2dbb9923d546b691791ca645e0e5d5 | |
parent | 2100df431cfb51ba25a020377ec4c3dd4d220f47 (diff) | |
download | portage-28967e6e154ccc0f2606df12a23efb50dffaa083.tar.gz portage-28967e6e154ccc0f2606df12a23efb50dffaa083.tar.bz2 portage-28967e6e154ccc0f2606df12a23efb50dffaa083.zip |
Use write_atomic for updates of old style digest files.
svn path=/main/trunk/; revision=3021
-rw-r--r-- | pym/portage_manifest.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 075be9380..4a5428c82 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -3,6 +3,7 @@ import os, sets import portage, portage_exception, portage_versions, portage_const from portage_checksum import * from portage_exception import * +from portage_util import write_atomic class FileNotInManifestException(PortageException): pass @@ -120,10 +121,8 @@ class Manifest(object): for cpv in cpvlist: dname = os.path.join(self.pkgdir, "files", "digest-"+portage.catsplit(cpv)[1]) distlist = self._getCpvDistfiles(cpv) - fd = open(dname, "w") - fd.write("\n".join(self._createDigestLines1(distlist, self.fhashdict))) - fd.write("\n") - fd.close() + write_atomic(dname, + "\n".join(self._createDigestLines1(distlist, self.fhashdict))+"\n") rval.append(dname) return rval |