summaryrefslogtreecommitdiffstats
path: root/pym/portage_manifest.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 04:42:00 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 04:42:00 +0000
commite8addd60ff509f92ed1a52feb4f66022c0ec9da5 (patch)
tree5172503003534becb9eb4c7f6e44f775319d2faa /pym/portage_manifest.py
parent3d57501e8f8d81020328a05df3a40fe005768cd6 (diff)
downloadportage-e8addd60ff509f92ed1a52feb4f66022c0ec9da5.tar.gz
portage-e8addd60ff509f92ed1a52feb4f66022c0ec9da5.tar.bz2
portage-e8addd60ff509f92ed1a52feb4f66022c0ec9da5.zip
Some minor fixes for manifest code (branches/2.1.2 r6923)
svn path=/main/branches/2.1.2.9/; revision=7476
Diffstat (limited to 'pym/portage_manifest.py')
-rw-r--r--pym/portage_manifest.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py
index cdccbd9fa..6645963dd 100644
--- a/pym/portage_manifest.py
+++ b/pym/portage_manifest.py
@@ -79,7 +79,8 @@ class ManifestEntry(object):
class Manifest1Entry(ManifestEntry):
def __str__(self):
- for hashkey in self.hashes:
+ myhashkeys = self.hashes.keys()
+ for hashkey in myhashkeys:
if hashkey != "size":
break
hashvalue = self.hashes[hashkey]
@@ -343,15 +344,8 @@ class Manifest(object):
except FileNotFound:
pass
- def checkIntegrity(self):
- for t in self.fhashdict:
- for f in self.fhashdict[t]:
- if portage_const.MANIFEST2_REQUIRED_HASH not in self.fhashdict[t][f]:
- raise MissingParameter("Missing %s checksum: %s %s" % (portage_const.MANIFEST2_REQUIRED_HASH, t, f))
-
def write(self, sign=False, force=False):
""" Write Manifest instance to disk, optionally signing it """
- self.checkIntegrity()
try:
if self.compat:
self._writeDigests()
@@ -488,12 +482,12 @@ class Manifest(object):
except OSError:
pass
if f in distfilehashes and \
- not required_hash_types.difference(distfilehashes[f]) and \
((assumeDistHashesSometimes and mystat is None) or \
(assumeDistHashesAlways and mystat is None) or \
(assumeDistHashesAlways and mystat is not None and \
len(distfilehashes[f]) == len(self.hashes) and \
- distfilehashes[f]["size"] == mystat.st_size)):
+ distfilehashes[f]["size"] == mystat.st_size)) and \
+ not required_hash_types.difference(distfilehashes[f]):
self.fhashdict["DIST"][f] = distfilehashes[f]
else:
try: