1 |
commit: 87e32d4863f3f72ace3fc123b04a0e6f5ff96799 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 28 02:09:34 2015 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 29 20:27:41 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=87e32d48 |
7 |
|
8 |
repoman: fix KeyError triggered by fetch failure during manifest generation (bug 569942) |
9 |
|
10 |
Fix Scanner not to override portdbapi._aux_cache_keys when generating |
11 |
manifests, since spawn_nofetch requires additional keys. |
12 |
|
13 |
Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.") |
14 |
X-Gentoo-Bug: 569942 |
15 |
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=569942 |
16 |
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org> |
17 |
|
18 |
pym/repoman/scanner.py | 10 +++++++--- |
19 |
1 file changed, 7 insertions(+), 3 deletions(-) |
20 |
|
21 |
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py |
22 |
index 9a87f65..d1c10d7 100644 |
23 |
--- a/pym/repoman/scanner.py |
24 |
+++ b/pym/repoman/scanner.py |
25 |
@@ -93,9 +93,13 @@ class Scanner(object): |
26 |
self.portdb.settings = self.repo_settings.repoman_settings |
27 |
# We really only need to cache the metadata that's necessary for visibility |
28 |
# filtering. Anything else can be discarded to reduce memory consumption. |
29 |
- self.portdb._aux_cache_keys.clear() |
30 |
- self.portdb._aux_cache_keys.update( |
31 |
- ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) |
32 |
+ if self.options.mode != "manifest" and self.options.digest != "y": |
33 |
+ # Don't do this when generating manifests, since that uses |
34 |
+ # additional keys if spawn_nofetch is called (RESTRICT and |
35 |
+ # DEFINED_PHASES). |
36 |
+ self.portdb._aux_cache_keys.clear() |
37 |
+ self.portdb._aux_cache_keys.update( |
38 |
+ ["EAPI", "IUSE", "KEYWORDS", "repository", "SLOT"]) |
39 |
|
40 |
self.reposplit = myreporoot.split(os.path.sep) |
41 |
self.repolevel = len(self.reposplit) |