When investigating this test failure triggered by the fix for bug 692746: > ====================================================================== > FAIL: testSonameSkipUpdate (portage.tests.resolver.soname.test_skip_update.SonameSkipUpdateTestCase) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "lib/portage/tests/__init__.py", line 211, in run > testMethod() > File "lib/portage/tests/resolver/soname/test_skip_update.py", line 82, in testSonameSkipUpdate > test_case.fail_msg) > AssertionError: False != True : atoms: (@world), key: success, expected: True, got: False > atoms: (@world), key: mergelist, expected: [], got: ['[binary]dev-libs/B-1', '[binary]dev-libs/B-2', '[binary]app-misc/A-1'] > atoms: (@world), key: slot_collision_solutions, expected: None, got: [] I found that backtracking terminates prematurely, and this fixes the problem: > diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py > index 3e99ac077..08240af67 100644 > --- a/lib/_emerge/depgraph.py > +++ b/lib/_emerge/depgraph.py > @@ -9794,8 +9794,8 @@ def _backtrack_depgraph(settings, trees, myopts, myparams, myaction, myfiles, sp > elif mydepgraph.need_restart(): > backtracked += 1 > backtracker.feedback(mydepgraph.get_backtrack_infos()) > - else: > - break > + elif backtracker: > + backtracked += 1 > > if not (success or mydepgraph.need_config_change()) and backtracked: This change greatly increases the probability of backtracking success.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=bb0bb4104b0d6cab16abce9cd6e1683c0b6d5c8d commit bb0bb4104b0d6cab16abce9cd6e1683c0b6d5c8d Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-09-01 00:24:43 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-09-01 00:30:04 +0000 _backtrack_depgraph: fix premature backtracking termination (bug 693242) Make backtracking continue as long as the backtracker has remaining nodes to explore. This fixes a case where it would terminate prematurely when the depgraph.need_restart() method returned False, even though the backtracker had remaining nodes to explore. Bug: https://bugs.gentoo.org/693242 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/depgraph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc1ee19f135a3446d16deac8f783472b464e3a2e commit fc1ee19f135a3446d16deac8f783472b464e3a2e Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-09-01 21:12:24 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-09-01 21:20:36 +0000 sys-apps/portage: Bump to version 2.3.75 #235970 glsa-check: add --reverse option #692134 glsa-check: fix truncated CVE ids in listmode #692746 missed virtual/libmysqlclient update #693242 premature backtracking termination Bug: https://bugs.gentoo.org/691278 Bug: https://bugs.gentoo.org/235970 Bug: https://bugs.gentoo.org/692134 Bug: https://bugs.gentoo.org/692746 Bug: https://bugs.gentoo.org/693242 Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-2.3.75.ebuild | 261 +++++++++++++++++++++++++++++++++ 2 files changed, 262 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=54cab2dea3c55cbcd3a9bc2831c0ad25b12f12fa commit 54cab2dea3c55cbcd3a9bc2831c0ad25b12f12fa Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2019-09-12 18:59:09 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-09-12 19:03:04 +0000 SlotConflictMaskUpdateTestCase: remove todo flag (bug 693242) This test passes since the fix premature backtracking termination in commit bb0bb4104b0d6cab16abce9cd6e1683c0b6d5c8d. Bug: https://bugs.gentoo.org/693242 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/tests/resolver/test_slot_conflict_mask_update.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)