From bfc783f71997ec4f34c81e3e140cd4b69022f85f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Jul 2006 06:32:37 +0000 Subject: Allow a digest to be created before any distfiles have been fetched for bug #141843. svn path=/main/trunk/; revision=4043 --- pym/portage_manifest.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pym/portage_manifest.py') diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 8fbe6bc62..687d7ca10 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() -- cgit v1.2.3-1-g7c22