aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-03-21 13:06:35 -0700
committerBrian Dolbec <dolsen@gentoo.org>2015-04-03 17:46:59 -0700
commit903c77d80d1029833a9e4b778727ed227f83578d (patch)
tree580c65f2bf706f1955e0b386267f693239cbd544
parentdispatch-conf: fix unicode handling (bug 545270) (diff)
downloadportage-903c77d80d1029833a9e4b778727ed227f83578d.tar.gz
portage-903c77d80d1029833a9e4b778727ed227f83578d.tar.bz2
portage-903c77d80d1029833a9e4b778727ed227f83578d.zip
portage/manifest.py: whitespace cleanup
-rw-r--r--pym/portage/manifest.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/pym/portage/manifest.py b/pym/portage/manifest.py
index 3936b9a1d..118f1b7b4 100644
--- a/pym/portage/manifest.py
+++ b/pym/portage/manifest.py
@@ -175,14 +175,14 @@ class Manifest(object):
def getFullname(self):
""" Returns the absolute path to the Manifest file for this instance """
return os.path.join(self.pkgdir, "Manifest")
-
+
def getDigests(self):
""" Compability function for old digest/manifest code, returns dict of filename:{hashfunction:hashvalue} """
rval = {}
for t in MANIFEST2_IDENTIFIERS:
rval.update(self.fhashdict[t])
return rval
-
+
def getTypeDigests(self, ftype):
""" Similar to getDigests(), but restricted to files of the given type. """
return self.fhashdict[ftype]
@@ -351,22 +351,22 @@ class Manifest(object):
self.fhashdict[ftype][fname].update(hashdict)
if not MANIFEST2_REQUIRED_HASH in self.fhashdict[ftype][fname]:
self.updateFileHashes(ftype, fname, checkExisting=False, ignoreMissing=ignoreMissing)
-
+
def removeFile(self, ftype, fname):
""" Remove given entry from Manifest """
del self.fhashdict[ftype][fname]
-
+
def hasFile(self, ftype, fname):
""" Return whether the Manifest contains an entry for the given type,filename pair """
return (fname in self.fhashdict[ftype])
-
+
def findFile(self, fname):
""" Return entrytype of the given file if present in Manifest or None if not present """
for t in MANIFEST2_IDENTIFIERS:
if fname in self.fhashdict[t]:
return t
return None
-
+
def create(self, checkExisting=False, assumeDistHashesSometimes=False,
assumeDistHashesAlways=False, requiredDistfiles=[]):
""" Recreate this Manifest from scratch. This will not use any
@@ -521,17 +521,17 @@ class Manifest(object):
absname = os.path.join(self.pkgdir, "files", fname)
else:
absname = os.path.join(self.pkgdir, fname)
- return absname
-
+ return absname
+
def checkAllHashes(self, ignoreMissingFiles=False):
for t in MANIFEST2_IDENTIFIERS:
self.checkTypeHashes(t, ignoreMissingFiles=ignoreMissingFiles)
-
+
def checkTypeHashes(self, idtype, ignoreMissingFiles=False, hash_filter=None):
for f in self.fhashdict[idtype]:
self.checkFileHashes(idtype, f, ignoreMissing=ignoreMissingFiles,
hash_filter=hash_filter)
-
+
def checkFileHashes(self, ftype, fname, ignoreMissing=False, hash_filter=None):
digests = _filter_unaccelarated_hashes(self.fhashdict[ftype][fname])
if hash_filter is not None:
@@ -558,7 +558,7 @@ class Manifest(object):
if checkDistfiles or onlyDistfiles:
for f in self._getCpvDistfiles(cpv):
self.checkFileHashes("DIST", f, ignoreMissing=False)
-
+
def _getCpvDistfiles(self, cpv):
""" Get a list of all DIST files associated to the given cpv """
return self.fetchlist_dict[cpv]
@@ -583,12 +583,12 @@ class Manifest(object):
myhashkeys.remove(k)
myhashes = perform_multiple_checksums(self._getAbsname(ftype, fname), myhashkeys)
self.fhashdict[ftype][fname].update(myhashes)
-
+
def updateTypeHashes(self, idtype, checkExisting=False, ignoreMissingFiles=True):
""" Regenerate all hashes for all files of the given type """
for fname in self.fhashdict[idtype]:
self.updateFileHashes(idtype, fname, checkExisting)
-
+
def updateAllHashes(self, checkExisting=False, ignoreMissingFiles=True):
""" Regenerate all hashes for all files in this Manifest. """
for idtype in MANIFEST2_IDENTIFIERS: