Summary: | sys-apps/portage-3.0.61-r1 raises KeyError when asking to --fetchonly | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sebastian Pucilowski <smopucilowski> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | luke, setun.90, zmedico |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=607252 https://bugs.gentoo.org/show_bug.cgi?id=675748 https://bugs.gentoo.org/show_bug.cgi?id=161422 https://github.com/gentoo/portage/pull/1236 https://bugs.gentoo.org/show_bug.cgi?id=915494 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 921380 | ||
Bug Blocks: | 377365 |
Description
Sebastian Pucilowski
2024-01-13 11:55:17 UTC
This KeyError should not happen because it indicates a inconsistent/corrupt state. Maybe the _solve_non_slot_operator_slot_conflicts method could corrupt the state like this, though it's not obvious how that would happen. The --fetchonly option causes the _accept_blocker_conflicts method to return False, which prevents some backtracking, and explains how it can get into a different state than without --fetchonly. The backtracking which --fetchonly suppresses could hide this sort of inconsistent/corrupt state, since backtracking causes this state to be discarded. It could be that _eliminate_rebuilds does itself corrupt the state, since it may have modified the parent in a previous iteration of the loop, if both parent and child were in the @__auto_slot_operator_replace_installed__ set. I think we need to align the _accept_blocker_conflicts backtracking behavior with the normal behavior, since it's very annoying to get different results here. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=a5078e5774932103d4ad367de4c6bf130a6da34f commit a5078e5774932103d4ad367de4c6bf130a6da34f Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-01-15 23:10:03 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-01-16 16:01:53 +0000 emerge: backtrack consistently regardless of --fetchonly Make the _accept_blocker_conflicts method always return True when backtracking is enabled, so that backtracking results will be identical regardless of options that _accept_blocker_conflicts treats specially. This way, conflicts will only be accepted when backtracking is disabled or all backtracking tries have been exhausted. Make --nodeps imply --backtrack=0, since backtracking is only useful with dependencies. Make _eliminate_rebuilds return early if there are slot conflicts, since the merge list is invalid anyway, and its possible that state inconsistencies could trigger unexpected exceptions as in bug 922038. Make the KeyError from bug 922038 a warning, and include relevant information to help trace the inconsistency back to the _eliminate_rebuilds method or some other source like _solve_non_slot_operator_slot_conflicts. Bug: https://bugs.gentoo.org/161422 Bug: https://bugs.gentoo.org/607252 Bug: https://bugs.gentoo.org/675748 Bug: https://bugs.gentoo.org/922038 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/depgraph.py | 63 +++++++++++++++++++++++++++++++++++++++++++++---- man/emerge.1 | 5 ++-- 2 files changed, 61 insertions(+), 7 deletions(-) *** Bug 924060 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77c44c46194922509bc4f2b5cfc099412a560a69 commit 77c44c46194922509bc4f2b5cfc099412a560a69 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-22 07:23:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-22 07:23:50 +0000 sys-apps/portage: add 3.0.62 Closes: https://bugs.gentoo.org/663324 Closes: https://bugs.gentoo.org/728046 Closes: https://bugs.gentoo.org/891137 Closes: https://bugs.gentoo.org/906368 Closes: https://bugs.gentoo.org/916566 Closes: https://bugs.gentoo.org/921170 Closes: https://bugs.gentoo.org/921208 Closes: https://bugs.gentoo.org/921400 Closes: https://bugs.gentoo.org/922038 Closes: https://bugs.gentoo.org/922142 Closes: https://bugs.gentoo.org/923368 Closes: https://bugs.gentoo.org/923750 Closes: https://bugs.gentoo.org/923841 Closes: https://bugs.gentoo.org/923852 Closes: https://bugs.gentoo.org/923854 Closes: https://bugs.gentoo.org/924192 Closes: https://bugs.gentoo.org/924273 Closes: https://bugs.gentoo.org/924585 Closes: https://bugs.gentoo.org/921380 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.62.ebuild | 246 +++++++++++++++++++++++++++++++++ 2 files changed, 247 insertions(+) |