summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-28 06:32:37 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-28 06:32:37 +0000
commitbfc783f71997ec4f34c81e3e140cd4b69022f85f (patch)
tree39656ab1ffb833e24e169c3e49eee6315618ac25 /pym
parentAdd a --force option for `ebuild digest` so that the user doesn't have to man... (diff)
downloadportage-idfetch-bfc783f71997ec4f34c81e3e140cd4b69022f85f.tar.gz
portage-idfetch-bfc783f71997ec4f34c81e3e140cd4b69022f85f.tar.bz2
portage-idfetch-bfc783f71997ec4f34c81e3e140cd4b69022f85f.zip
Allow a digest to be created before any distfiles have been fetched for bug #141843.
svn path=/main/trunk/; revision=4043
Diffstat (limited to 'pym')
-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 8fbe6bc6..687d7ca1 100644
--- a/pym/portage_manifest.py
+++ b/pym/portage_manifest.py
@@ -403,7 +403,7 @@ class Manifest(object):
return None
def create(self, checkExisting=False, assumeDistHashesSometimes=False,
- assumeDistHashesAlways=False, requiredDistfiles=None):
+ assumeDistHashesAlways=False, requiredDistfiles=[]):
""" Recreate this Manifest from scratch. This will not use any
existing checksums unless assumeDistHashesSometimes or
assumeDistHashesAlways is true (assumeDistHashesSometimes will only
@@ -445,7 +445,11 @@ class Manifest(object):
distlist = set()
for cpv in cpvlist:
distlist.update(self._getCpvDistfiles(cpv))
- if requiredDistfiles is None or len(requiredDistfiles) == 0:
+ if requiredDistfiles is None:
+ # This allows us to force removal of stale digests for the
+ # ebuild --force digest option (no distfiles are required).
+ requiredDistfiles = set()
+ elif len(requiredDistfiles) == 0:
# repoman passes in an empty list, which implies that all distfiles
# are required.
requiredDistfiles = distlist.copy()