diff options
author | Raul E Rangel <rrangel@google.com> | 2024-10-16 13:16:58 -0600 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2024-10-22 14:11:43 -0700 |
commit | d33526523254645432ea5c20cb21086a7876f4ea (patch) | |
tree | 39dc6adf1a148ba4ca153271212a15f0c4e475a2 /lib | |
parent | actions: test spawn under 3.13 (diff) | |
download | portage-d33526523254645432ea5c20cb21086a7876f4ea.tar.gz portage-d33526523254645432ea5c20cb21086a7876f4ea.tar.bz2 portage-d33526523254645432ea5c20cb21086a7876f4ea.zip |
depgraph: Ignore blockers when computing virtual deps visibility
If a `virtual/` package declares a blocker to a package that doesn't
exist, then `_virt_deps_visible` incorrectly marks the virtual as
"not visible". Blockers should be ignored when performing the deps
visibility test since blockers are handled later in the pipeline.
Bug: https://issuetracker.google.com/issues/373581679#comment13
Signed-off-by: Raul E Rangel <rrangel@google.com>
Closes: https://github.com/gentoo/portage/pull/1387
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_emerge/depgraph.py | 2 | ||||
-rw-r--r-- | lib/portage/tests/resolver/test_virtual_slot.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 2acd8f2e1..ddef7bb0a 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -6022,6 +6022,8 @@ class depgraph: for atoms in rdepend.values(): for atom in atoms: + if atom.blocker: + continue if ignore_use: atom = atom.without_use pkg, existing = self._select_package(pkg.root, atom) diff --git a/lib/portage/tests/resolver/test_virtual_slot.py b/lib/portage/tests/resolver/test_virtual_slot.py index 19dc254dd..b032fca8c 100644 --- a/lib/portage/tests/resolver/test_virtual_slot.py +++ b/lib/portage/tests/resolver/test_virtual_slot.py @@ -71,7 +71,13 @@ class VirtualSlotResolverTestCase(TestCase): }, "virtual/jdk-1.7.0": { "SLOT": "1.7", - "RDEPEND": "|| ( =dev-java/icedtea-7* =dev-java/oracle-jdk-bin-1.7.0* )", + "RDEPEND": """ + || ( + =dev-java/icedtea-7* + =dev-java/oracle-jdk-bin-1.7.0* + ) + !virtual/jdk-does-not-exist + """, }, } |