Summary: | REQUIRED_USE unsatisfied error with --fetchonly --pretend, but not with just --fetchonly | ||
---|---|---|---|
Product: | Portage Development | Reporter: | ta2002 <throw_away_2002> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | de.techno, Patrick.Fourniols, sam, zmedico |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=922038 https://github.com/gentoo/portage/pull/1297 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 925481 | ||
Bug Blocks: | 377365 |
Description
ta2002
2019-01-18 03:52:16 UTC
*** Bug 701888 has been marked as a duplicate of this bug. *** 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(-) I just saw this locally for sys-apps/portage even though the flag are properly set: [ebuild R ~] sys-apps/portage-3.0.63::gentoo USE="(ipc) native-extensions rsync-verify xattr -apidoc -build -doc -gentoo-dev (-selinux) -test" PYTHON_TARGETS="python3_10 python3_11 python3_12 -pypy3" 0 KiB # emerge -pvf portage These are the packages that would be fetched, in order: Calculating dependencies... done! Dependency resolution took 5.27 s (backtrack: 0/20). The following REQUIRED_USE flag constraints are unsatisfied: || ( python_targets_pypy3 python_targets_python3_10 python_targets_python3_11 python_targets_python3_12 ) This fixed it for me but I need to investigate this invalid USE setting that I saw in pdb: (Pdb) p pkg.use.enabled frozenset({'python_targets_python3_7', 'native-extensions'}) --- a/lib/portage/package/ebuild/doebuild.py +++ b/lib/portage/package/ebuild/doebuild.py @@ -1813,6 +1813,7 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi): invalid_dep_exempt_phases = {"clean", "cleanrm", "help", "prerm", "postrm"} all_keys = set(Package.metadata_keys) all_keys.add("SRC_URI") + all_keys.discard("USE") all_keys = tuple(all_keys) metadata = mysettings.configdict["pkg"] if all(k in metadata for k in ("PORTAGE_REPO_NAME", "SRC_URI")): It's actually my package.use settings that enter _validate_deps as mysettings.configdict["pkg"]["USE"] to corrupt the USE setting: (Pdb) p mysettings.configdict["pkg"]["USE"] 'native-extensions python_targets_python3_7' # grep -r sys-apps/portage /etc/portage/package.use sys-apps/portage native-extensions sys-apps/portage python_targets_python3_7 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=6ce2be8d454f95c508d9f547d13487f9de863bdd commit 6ce2be8d454f95c508d9f547d13487f9de863bdd Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-03-03 19:53:11 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-03-03 19:53:11 +0000 _validate_deps: Discard configdict["pkg"]["USE"] Since configdict["pkg"]["USE"] may contain package.use settings from config.setcpv, it is inappropriate to use here (bug 675748), so discard it. This is only an issue because configdict["pkg"] is a sub-optimal place to extract metadata from. This issue does not necessarily indicate a flaw in the Package constructor, since passing in precalculated USE can be valid for things like autounmask USE changes. Bug: https://bugs.gentoo.org/675748 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/package/ebuild/doebuild.py | 12 ++++++++++++ lib/portage/tests/ebuild/test_doebuild_fd_pipes.py | 19 ++++++++++++++++++- lib/portage/tests/resolver/ResolverPlayground.py | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) |