1 |
commit: e762752a8bf5c19e0d6d7b22de86306bfa4270ba |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 3 06:25:45 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 3 06:27:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e762752a |
7 |
|
8 |
dep_zapdeps: skip want_update_pkg if parent is None (bug 711400) |
9 |
|
10 |
Skip the want_update_pkg call when parent is None, since passing |
11 |
a None parent to want_update_pkg results in an error like this: |
12 |
|
13 |
File "libdep/dep_check.py", line 513, in dep_zapdeps |
14 |
if graph_interface.want_update_pkg(parent, avail_pkg): |
15 |
File "lib/_emerge/depgraph.py", line 5850, in _want_update_pkg |
16 |
depth = parent.depth or 0 |
17 |
AttributeError: 'NoneType' object has no attribute 'depth' |
18 |
|
19 |
Fixes: f7d83d75c6b0 ("dep_zapdeps: adjust || preference for slot upgrades (bug 706278)") |
20 |
Bug: https://bugs.gentoo.org/711400 |
21 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
22 |
|
23 |
lib/portage/dep/dep_check.py | 2 +- |
24 |
1 file changed, 1 insertion(+), 1 deletion(-) |
25 |
|
26 |
diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py |
27 |
index 1dd289eec..9534590bf 100644 |
28 |
--- a/lib/portage/dep/dep_check.py |
29 |
+++ b/lib/portage/dep/dep_check.py |
30 |
@@ -510,7 +510,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, |
31 |
else: |
32 |
new_slot_count = 0 |
33 |
for slot_atom, avail_pkg in slot_map.items(): |
34 |
- if graph_interface.want_update_pkg(parent, avail_pkg): |
35 |
+ if parent is not None and graph_interface.want_update_pkg(parent, avail_pkg): |
36 |
want_update = True |
37 |
if (not slot_atom.cp.startswith("virtual/") |
38 |
and not graph_db.match_pkgs(slot_atom)): |