diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-07-28 06:32:37 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-07-28 06:32:37 +0000 |
commit | bfc783f71997ec4f34c81e3e140cd4b69022f85f (patch) | |
tree | 39656ab1ffb833e24e169c3e49eee6315618ac25 | |
parent | 83dda008fba7d8dad213de5636b1847338ac8737 (diff) | |
download | portage-bfc783f71997ec4f34c81e3e140cd4b69022f85f.tar.gz portage-bfc783f71997ec4f34c81e3e140cd4b69022f85f.tar.bz2 portage-bfc783f71997ec4f34c81e3e140cd4b69022f85f.zip |
Allow a digest to be created before any distfiles have been fetched for bug #141843.
svn path=/main/trunk/; revision=4043
-rwxr-xr-x | bin/ebuild | 3 | ||||
-rw-r--r-- | pym/portage_manifest.py | 8 |
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() |