commit: 72d09cf05b1998302c7847624cea56328dbbf6e6
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 20 09:41:27 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 09:45:21 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=72d09cf0
repoman: clarify --force manifest code
Fixes: 005f56110e90 ("Make manifest mode with --force option...")
repoman/pym/repoman/modules/commit/manifest.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/repoman/pym/repoman/modules/commit/manifest.py
b/repoman/pym/repoman/modules/commit/manifest.py
index 498bfa4..475dae4 100644
--- a/repoman/pym/repoman/modules/commit/manifest.py
+++ b/repoman/pym/repoman/modules/commit/manifest.py
@@ -41,7 +41,7 @@ class Manifest(object):
fetchlist_dict = portage.FetchlistDict(
checkdir, self.repoman_settings, self.portdb)
if self.options.mode == 'manifest' and
self.options.force:
- self._create_manifest(checkdir, fetchlist_dict)
+ self._discard_dist_digests(checkdir,
fetchlist_dict)
self.repoman_settings["O"] = checkdir
try:
self.generated_manifest = digestgen(
@@ -84,8 +84,15 @@ class Manifest(object):
sys.exit(1)
return False
- def _create_manifest(self, checkdir, fetchlist_dict):
- '''Creates a Manifest file
+ def _discard_dist_digests(self, checkdir, fetchlist_dict):
+ '''Discard DIST digests for files that exist in DISTDIR
+
+ This method is intended to be called prior to digestgen, only
for
+ manifest mode with the --force option, in order to discard DIST
+ digests that we intend to update. This is necessary because
+ digestgen never replaces existing digests, since otherwise it
+ would be too easy for ebuild developers to accidentally corrupt
+ existing DIST digests.
@param checkdir: the directory to generate the Manifest in
@param fetchlist_dict: dictionary of files to fetch and/or
include