summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ebuild3
-rw-r--r--pym/portage_manifest.py8
2 files changed, 8 insertions, 3 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 64375298a..22a65482a 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -90,7 +90,8 @@ def discard_digests(myebuild, mysettings, mydbapi):
from portage_manifest import Manifest
mf = Manifest(pkgdir, mysettings["DISTDIR"],
fetchlist_dict=portage.FetchlistDict(pkgdir, mysettings, mydbapi))
- mf.create([], assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
+ mf.create(requiredDistfiles=None,
+ assumeDistHashesSometimes=True, assumeDistHashesAlways=True)
distfiles = mydbapi.getfetchlist(cpv, mysettings=mysettings, all=True)[1]
for myfile in distfiles:
try:
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()