diff options
author | Zac Medico <zmedico@gentoo.org> | 2015-12-27 18:09:34 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2015-12-29 12:27:41 -0800 |
commit | 87e32d4863f3f72ace3fc123b04a0e6f5ff96799 (patch) | |
tree | 5ba7fdf277b63d0ea3fae02acbde0214baf90ab0 | |
parent | repoman: add clutter to inherit.deprecated, bug #486362 (diff) | |
download | portage-87e32d48.tar.gz portage-87e32d48.tar.bz2 portage-87e32d48.zip |
repoman: fix KeyError triggered by fetch failure during manifest generation (bug 569942)
Fix Scanner not to override portdbapi._aux_cache_keys when generating
manifests, since spawn_nofetch requires additional keys.
Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.")
X-Gentoo-Bug: 569942
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=569942
Acked-by: Brian Dolbec <dolsen@gentoo.org>
-rw-r--r-- | pym/repoman/scanner.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index 9a87f6516..d1c10d7b1 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -93,9 +93,13 @@ class Scanner(object): self.portdb.settings = self.repo_settings.repoman_settings # We really only need to cache the metadata that's necessary for visibility # filtering. Anything else can be discarded to reduce memory consumption. - self.portdb._aux_cache_keys.clear() - self.portdb._aux_cache_keys.update( - ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) + if self.options.mode != "manifest" and self.options.digest != "y": + # Don't do this when generating manifests, since that uses + # additional keys if spawn_nofetch is called (RESTRICT and + # DEFINED_PHASES). + self.portdb._aux_cache_keys.clear() + self.portdb._aux_cache_keys.update( + ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) self.reposplit = myreporoot.split(os.path.sep) self.repolevel = len(self.reposplit) |