Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689644 (build-order) - [TRACKER] sys-apps/portage fails to provide correct build order during reinstallation
Summary: [TRACKER] sys-apps/portage fails to provide correct build order during reinst...
Status: CONFIRMED
Alias: build-order
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Tracker
: 586020 605486 638914 686838 774045 (view as bug list)
Depends on: 199856 463976 Locale-gettext 687552 754777 756199 834572 921333 586020 596664 605486 631490 638914 686838 690436 703676 749777 754903 764365 793992 836726
Blocks: 155723
  Show dependency tree
 
Reported: 2019-07-11 05:34 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2024-02-02 22:39 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-07-11 05:34:59 UTC
I've made this tracker because I'm just tired of creating the ever growing list of "See Also".

The essential problem is:

* Package X requires package Y
* Changes in the dependency graph lead to Y being temporarily broken, perhaps to the point of being effectively uninstalled
* Portage's graph ordering for recompiling X does not factor for this, and treats the presence of Y in the VDB as adequate proof for compiling against it/running it
* Package X is attempted to be reinstalled
* Package X predictably fails installation due to its dependencies not being satisfied.

This is "hell", because much of the time, there isn't any way we can make this problem easier for users by fixing the ebuilds themselves, all their DEPEND data is already correct, SUBSLOTs are already used where applicable.

And more over, some of these breakages have potential for recursive effects down the graph, eg: Y is not directly broken, but its dependency Z is, thus, Y is now itself broken, and things using it will in turn break.

Examples of this happening go back to *2007*, and although some forms of it have been fixed, this keeps happening.

Please block examples of this problem against this bug.
Comment 1 Larry the Git Cow gentoo-dev 2019-12-26 23:00:13 UTC
The bug has been referenced in the following commit(s):

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

commit 680276cc4d4faa653203366cbe3c896ac3883cf2
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-12-25 08:37:18 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-26 22:56:39 +0000

    _serialize_tasks: limit scope of dropped circular dependencies
    
    Ensure that all members of a buildtime dependency cycle are merged
    as a group, such that packages which depend on one or more members
    of the group will only be merged *after* the entire group has been
    merged.
    
    This extends runtime cycle handling to also handle buildtime cycles
    in cases where the buildtime dependencies happen to be satisfied by
    installed packages. In situations when this is necessary, it is
    desirable to rely on the old installed instances of these packages
    as little as possible, since they might have been broken by the
    upgrade of a package that is a member of the dependency cycle.
    Upgrading members of the cycle as a group effectively minimizes
    reliance on the old installed package instances, avoiding some cases
    of bug 199856. For example, it should avoid bug 703676, where
    libspectre reportedly failed to build against an old installed
    instance of ghostscript-gpl.
    
    Bug: https://bugs.gentoo.org/199856
    Bug: https://bugs.gentoo.org/689644
    Bug: https://bugs.gentoo.org/690436
    Bug: https://bugs.gentoo.org/703676
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py                        | 94 +++++++++++++++-----------
 lib/portage/tests/resolver/test_merge_order.py | 25 ++++++-
 2 files changed, 78 insertions(+), 41 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2019-12-26 23:01:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1793a98a4543c8ea3b166af4383744ab060f37d5

commit 1793a98a4543c8ea3b166af4383744ab060f37d5
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-12-26 22:46:29 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-12-26 22:49:36 +0000

    sys-apps/portage: Bump to version 2.3.84
    
     #690436 limit scope of dropped circular dependencies, which should
             solve some cases of bug 199856 such as bug 703676 (also see
             tracker bug 689644)
    
    Bug: https://bugs.gentoo.org/701268
    Bug: https://bugs.gentoo.org/199856
    Bug: https://bugs.gentoo.org/689644
    Bug: https://bugs.gentoo.org/690436
    Bug: https://bugs.gentoo.org/703676
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.84.ebuild | 276 +++++++++++++++++++++++++++++++++
 2 files changed, 277 insertions(+)
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2021-05-17 21:32:16 UTC
*** Bug 686838 has been marked as a duplicate of this bug. ***
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2021-05-17 21:34:05 UTC
*** Bug 605486 has been marked as a duplicate of this bug. ***
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2021-05-17 21:34:18 UTC
*** Bug 638914 has been marked as a duplicate of this bug. ***
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2021-05-17 21:34:29 UTC
*** Bug 586020 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2021-06-24 01:13:25 UTC
*** Bug 774045 has been marked as a duplicate of this bug. ***
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-09 21:13:07 UTC
FTR, we suspect that:

commit 224207c7d1988a354d004507bb7ecfb90b4ef097
Author: YiFei Zhu <zhuyifei1999@gmail.com>
Date:   Mon Jun 12 17:47:52 2023 -0700

    depgraph: Do not allow slotted deps to be satisfied by wrong slots
[...]

fixed many of these.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-09 21:13:23 UTC
(In reply to Sam James from comment #8)
> FTR, we suspect that:
> 
> commit 224207c7d1988a354d004507bb7ecfb90b4ef097
> Author: YiFei Zhu <zhuyifei1999@gmail.com>
> Date:   Mon Jun 12 17:47:52 2023 -0700
> 
>     depgraph: Do not allow slotted deps to be satisfied by wrong slots
> [...]
> 
> fixed many of these.

(which is in portage-3.0.49)