aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-06-22 23:18:12 -0700
committerZac Medico <zmedico@gentoo.org>2016-06-26 16:49:48 -0700
commit0ccb4f0fefa54592f9c90c70c855dbe35d0ede75 (patch)
tree774bf5b47efedb7017789e0d899351b76611b237
parentAdd a unit test which reproduces bug 584626 (diff)
downloadportage-0ccb4f0fefa54592f9c90c70c855dbe35d0ede75.tar.gz
portage-0ccb4f0fefa54592f9c90c70c855dbe35d0ede75.tar.bz2
portage-0ccb4f0fefa54592f9c90c70c855dbe35d0ede75.zip
depgraph: fix missed llvm update (bug 584626)
Fix check_reverse_dependencies to ignore dependencies of parent packages for which updates are desirable. This solves a missed llvm update by ignoring a reverse dependency from the installed instance of clang, since an update to a newer version of clang is desirable. In order to cope with this change, there are 2 existing unit tests that require larger --backtrack settings in order to succeed. X-Gentoo-Bug: 584626 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=584626 Acked-by: Brian Dolbec <dolsen@gentoo.org>
-rw-r--r--pym/_emerge/depgraph.py21
-rw-r--r--pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py1
-rw-r--r--pym/portage/tests/resolver/test_slot_conflict_rebuild.py2
-rw-r--r--pym/portage/tests/resolver/test_slot_operator_reverse_deps.py6
4 files changed, 28 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f78f08db0..c1c37b4f1 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1822,6 +1822,15 @@ class depgraph(object):
# necessarily relevant.
continue
+ if (not self._too_deep(parent.depth) and
+ not self._frozen_config.excluded_pkgs.
+ findAtomForPackage(parent,
+ modified_use=self._pkg_use_enabled(parent)) and
+ self._upgrade_available(parent)):
+ # This parent may be irrelevant, since an
+ # update is available (see bug 584626).
+ continue
+
atom_set = InternalPackageSet(initial_atoms=(atom,),
allow_repo=True)
if not atom_set.findAtomForPackage(candidate_pkg,
@@ -2113,6 +2122,18 @@ class depgraph(object):
self._dynamic_config._need_restart = True
+ def _upgrade_available(self, pkg):
+ """
+ Detect cases where an upgrade of the given package is available
+ within the same slot.
+ """
+ for available_pkg in self._iter_similar_available(pkg,
+ pkg.slot_atom):
+ if available_pkg > pkg:
+ return True
+
+ return False
+
def _downgrade_probe(self, pkg):
"""
Detect cases where a downgrade of the given package is considered
diff --git a/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py b/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
index 40e69955e..f4747611f 100644
--- a/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
+++ b/pym/portage/tests/resolver/soname/test_slot_conflict_reinstall.py
@@ -89,6 +89,7 @@ class SonameSlotConflictReinstallTestCase(TestCase):
"--ignore-soname-deps": "n",
"--update": True,
"--usepkgonly": True,
+ "--backtrack": 10,
},
success = True,
mergelist = [
diff --git a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py
index b39eaf0dd..2dfa79cc2 100644
--- a/pym/portage/tests/resolver/test_slot_conflict_rebuild.py
+++ b/pym/portage/tests/resolver/test_slot_conflict_rebuild.py
@@ -91,7 +91,7 @@ class SlotConflictRebuildTestCase(TestCase):
# upgrade and we don't want to trigger unnecessary rebuilds.
ResolverPlaygroundTestCase(
["@world"],
- options = {"--update": True, "--deep": True},
+ options = {"--update": True, "--deep": True, "--backtrack": 4},
success = True,
mergelist = ["app-misc/D-2", "app-misc/E-0"]),
diff --git a/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
index 72879f8d9..ce614a4dc 100644
--- a/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
+++ b/pym/portage/tests/resolver/test_slot_operator_reverse_deps.py
@@ -79,7 +79,11 @@ class SlotOperatorReverseDepsTestCase(TestCase):
["@world"],
options = {"--update": True, "--deep": True},
success = True,
- mergelist = [],
+ mergelist = [
+ 'sys-devel/llvm-3.8.0-r2',
+ 'sys-devel/clang-3.8.0-r100',
+ 'media-libs/mesa-11.2.2',
+ ],
),
ResolverPlaygroundTestCase(