Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717140 - upgrade/downgrade loop around libgit2, libgit2-glib and gitg
Summary: upgrade/downgrade loop around libgit2, libgit2-glib and gitg
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 508762
Blocks: 300071 711148
  Show dependency tree
 
Reported: 2020-04-11 20:21 UTC by Rémi Cardona (RETIRED)
Modified: 2021-01-11 00:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --debug output (portage.log.xz,336.94 KB, application/x-xz)
2020-04-11 20:21 UTC, Rémi Cardona (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rémi Cardona (RETIRED) gentoo-dev 2020-04-11 20:21:01 UTC
Created attachment 632332 [details]
emerge --debug output

On a freshly updated system:

exos ~ # emerge -av gitg -DuN --changed-deps

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-libs/libgit2-0.99.0-r1:0/0.99::gentoo  USE="ssh threads -examples -gssapi -libressl -test -trace" 0 KiB
[ebuild  N     ] dev-libs/libgit2-glib-0.99.0.1::gentoo  USE="python ssh vala -gtk-doc" PYTHON_TARGETS="python3_6 python3_7 -python3_8" 0 KiB
[ebuild  N     ] dev-vcs/gitg-3.32.1-r1::gentoo  USE="python -glade" PYTHON_TARGETS="python3_6 python3_7" 0 KiB

Total: 3 packages (3 new), Size of downloads: 0 KiB

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-libs/libgit2:0

  (dev-libs/libgit2-1.0.0-r1:0/1.0::gentoo, ebuild scheduled for merge) USE="ssh threads -examples -gssapi -libressl -test -trace" ABI_X86="(64)" conflicts with
    <dev-libs/libgit2-1:0=[ssh] required by (dev-libs/libgit2-glib-0.99.0.1:0/0::gentoo, ebuild scheduled for merge) USE="python ssh vala -gtk-doc" ABI_X86="(64)" PYTHON_TARGETS="python3_6 python3_7 -python3_8"
    ^                 ^        


Would you like to merge these packages? [Yes/No] 


Which I end up installing. Once the build done, if I try to emerge @world, portage ends up wanting to downgrade libgit2 (and rebuild the other rdeps). Attached is the --debug log output of said emerge @world resolution
Comment 1 Zac Medico gentoo-dev 2020-04-11 22:34:55 UTC
(In reply to Rémi Cardona from comment #0)
> Created attachment 632332 [details]
> emerge --debug output

The log shows that it goes off course here where it tries to trigger a slot operator rebuild:

> slot_operator_update_probe:
>    existing child package:  (dev-libs/libgit2-0.99.0-r1:0/0.99::gentoo, installed)
>    existing parent package: (dev-vcs/gitg-3.32.1-r1:0/0::gentoo, installed)
>    new child package:  (dev-libs/libgit2-1.0.0-r1:0/1.0::gentoo, ebuild scheduled for merge)
>    new parent package: (dev-vcs/gitg-3.32.1-r1:0/0::gentoo, ebuild scheduled for merge)

When it makes this decision, it explicitly ignores the <dev-libs/libgit2-1:0=[ssh] dependency of dev-libs/libgit2-glib-0.99.0.1 due to this logic related to bug 508762:

>     if parent in built_slot_operator_parents:
>         # This parent may need to be rebuilt, so its
>         # dependencies aren't necessarily relevant.
>         continue

The problematic logic comes from this commit:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d569a2d7275c65f991ea0e9648edf9458be240fa
Comment 2 Larry the Git Cow gentoo-dev 2020-04-11 23:50:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f049604664bff616b297a5c022b6a8277542eac9

commit f049604664bff616b297a5c022b6a8277542eac9
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-04-11 23:45:33 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-04-11 23:50:21 +0000

    Add test case to reproduce bug 717140
    
    Bug: https://bugs.gentoo.org/717140
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 .../resolver/test_slot_operator_reverse_deps.py    | 94 +++++++++++++++++++++-
 1 file changed, 93 insertions(+), 1 deletion(-)
Comment 4 Larry the Git Cow gentoo-dev 2020-04-12 01:50:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71016847d1979531a1d49c3b56a992bdab8e9d12

commit 71016847d1979531a1d49c3b56a992bdab8e9d12
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-04-12 01:36:47 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-04-12 01:49:57 +0000

    sys-apps/portage: Bump to version 2.3.99
    
     #717140 dev-libs/libgit2 upgrade/downgrade loop triggered by
             dev-libs/libgit2-glib dependency on <dev-libs/libgit2-1:0=[ssh]
    
    Bug: https://bugs.gentoo.org/711148
    Bug: https://bugs.gentoo.org/717140
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.99.ebuild | 259 +++++++++++++++++++++++++++++++++
 2 files changed, 260 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-04-12 01:52:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=9b755b46f9e88f25fecada0a32095ea614a73b57

commit 9b755b46f9e88f25fecada0a32095ea614a73b57
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2020-04-12 00:01:05 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2020-04-12 00:56:43 +0000

    depgraph: respect <foo-version:= for slot operator rebuild (bug 717140)
    
    When searching for slot operator rebuilds, respect non slot-operator
    components of parent dependencies, so that a <foo-version:= dependency
    like the <dev-libs/libgit2-1:0=[ssh?] dependency from bug 717140 will
    not be completely ignored. This will prevent erroneous attempts to
    trigger slot operator rebuilds for upgrades that would break
    <foo-version:= dependencies (which triggered upgrade/downgrade loops
    when backtracking tried to resolve the breakage).
    
    Fixes: d569a2d7275c ("_slot_operator_update_probe: fix bug #508762")
    Bug: https://bugs.gentoo.org/717140
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py                                      | 12 +++++++++---
 .../tests/resolver/test_slot_operator_reverse_deps.py        |  3 +--
 2 files changed, 10 insertions(+), 5 deletions(-)
Comment 6 Rémi Cardona (RETIRED) gentoo-dev 2020-04-12 19:28:57 UTC
Updated portage to 2.3.99 and the loop appears to be gone. Looks fixed to me. Thanks a lot, Zac! Cheers