diff options
author | Zac Medico <zmedico@gentoo.org> | 2020-03-02 22:25:45 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2020-03-02 22:27:12 -0800 |
commit | e762752a8bf5c19e0d6d7b22de86306bfa4270ba (patch) | |
tree | 61177b6be7c9a010d79a10626ea110799882cb45 | |
parent | EbuildMetadataPhase: make _unregister idempotent (bug 711362) (diff) | |
download | portage-e762752a8bf5c19e0d6d7b22de86306bfa4270ba.tar.gz portage-e762752a8bf5c19e0d6d7b22de86306bfa4270ba.tar.bz2 portage-e762752a8bf5c19e0d6d7b22de86306bfa4270ba.zip |
dep_zapdeps: skip want_update_pkg if parent is None (bug 711400)
Skip the want_update_pkg call when parent is None, since passing
a None parent to want_update_pkg results in an error like this:
File "libdep/dep_check.py", line 513, in dep_zapdeps
if graph_interface.want_update_pkg(parent, avail_pkg):
File "lib/_emerge/depgraph.py", line 5850, in _want_update_pkg
depth = parent.depth or 0
AttributeError: 'NoneType' object has no attribute 'depth'
Fixes: f7d83d75c6b0 ("dep_zapdeps: adjust || preference for slot upgrades (bug 706278)")
Bug: https://bugs.gentoo.org/711400
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | lib/portage/dep/dep_check.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py index 1dd289eec..9534590bf 100644 --- a/lib/portage/dep/dep_check.py +++ b/lib/portage/dep/dep_check.py @@ -510,7 +510,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, else: new_slot_count = 0 for slot_atom, avail_pkg in slot_map.items(): - if graph_interface.want_update_pkg(parent, avail_pkg): + if parent is not None and graph_interface.want_update_pkg(parent, avail_pkg): want_update = True if (not slot_atom.cp.startswith("virtual/") and not graph_db.match_pkgs(slot_atom)): |