Summary: | sys-apps/portage: find_smallest_cycle sometimes selects a single node | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Zac Medico <zmedico> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | critical | CC: | ago, esigra, flow, sam |
Priority: | Highest | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=754777 https://bugs.gentoo.org/show_bug.cgi?id=764365 https://bugs.gentoo.org/show_bug.cgi?id=279623 https://bugs.gentoo.org/show_bug.cgi?id=787785 https://bugs.gentoo.org/show_bug.cgi?id=590514 https://bugs.gentoo.org/show_bug.cgi?id=917259 https://bugs.gentoo.org/show_bug.cgi?id=921333 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 155723, 689644, 793992, 802210 |
Description
Zac Medico
![]() Ultimately, we'll want find_smallest_cycle to sort all of the edges in order of increasing priority. Then it can traverse this list of edges until it finds a cycle to select. *** Bug 762787 has been marked as a duplicate of this bug. *** Notes for if anyone works on this: - I have some IRC logs I might need to try and dump into this bug, but they're not neccessarily critical (zac's notes here are already good enough I think) - Zac did start on an impl at: * https://github.com/zmedico/portage/commit/38c1b3e8b3995d22665007c1433db1220bb27184 * https://github.com/zmedico/portage/commit/e053f744ab627cce73f06566e2a9f0da3db511e3 Been meaning to update the bug for while but kept forgetting. I do have a draft somewhere of starting on this but no idea where it's gone. No worries if you don't remember zac, but do you remember what was left to do with your patches? (In reply to Sam James from comment #3) Hmm, it's been a long time and I don't remember lots of details about these patches. I'll have to spend some time reviewing them. This breaks lib/portage/tests/resolver/test_perl_rebuild_bug.py because it selected automake to merge here:
> --- a/lib/_emerge/depgraph.py
> +++ b/lib/_emerge/depgraph.py
> @@ -9348,7 +9348,12 @@ class depgraph:
> # Exit this loop with the lowest possible priority, which
> # minimizes the use of installed packages to break cycles.
> if smallest_cycle is not None:
> - break
> + if len(smallest_cycle) < 2:
> + # Bug 756199: For cases where gather_deps returns a single
> + # node, keep searching for at least a two node cycle.
> + smallest_cycle = None
> + else:
> + break
>
> return smallest_cycle, ignore_priority
The leaf node selection code needs to be fixed to select automake without relying on find_smallest_cycle here.
|