commit:     ff270ae58eca457a1e2bbf9507d8438123082ca0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 23:01:30 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 23:07:06 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ff270ae5

depgraph._add_pkg: fix AttributeError when myparent is not a Package

Fixes: b991f23ad915 ("Allow a package to replace its own buildtime dependency")
Bug: https://bugs.gentoo.org/757741
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/_emerge/depgraph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 0450291d4..f3e834a60 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -3107,7 +3107,7 @@ class depgraph:
                                                                
self._frozen_config.myopts,
                                                                
modified_use=self._pkg_use_enabled(pkg))),
                                                                
level=logging.DEBUG, noiselevel=-1)
-                               elif (pkg.installed and myparent and
+                               elif (pkg.installed and isinstance(myparent, 
Package) and
                                        pkg.root == myparent.root and
                                        pkg.slot_atom == myparent.slot_atom):
                                        # If the parent package is replacing 
the child package then

Reply via email to