pkgcheck
pkgcheck copied to clipboard
[New Check]: Detect `REQUIRED_USE` that can't be satisfied because of flag masks
Is there an existing such new check request for this?
- [X] I have searched the existing issues
Explain
For example, add llvm_slot_15 to profiles/base/use.mask.
Now the package cannot be installed at all:
$ LLVM_SLOT=15 emerge -v shiboken2
These are the packages that would be merged, in order:
Calculating dependencies -
!!! Problem resolving dependencies for dev-python/shiboken2
... done!
Dependency resolution took 1.10 s (backtrack: 0/20).
!!! The ebuild selected to satisfy "shiboken2" has unmet requirements.
- dev-python/shiboken2-5.15.14::gentoo USE="docstrings test vulkan -numpy" ABI_X86="64" LLVM_SLOT="(-15)" PYTHON_TARGETS="python3_10 python3_11"
The following REQUIRED_USE flag constraints are unsatisfied:
llvm_slot_15
The above constraints are a subset of the following complete expression:
any-of ( python_targets_python3_10 python_targets_python3_11 ) exactly-one-of ( llvm_slot_15 )
But pkgcheck only reports a warning:
$ pkgcheck scan
dev-python/shiboken2
RequiredUseDefaults: version 5.15.14: profile: 'default/linux/amd64/23.0' (282 total) failed REQUIRED_USE: llvm_slot_15
Would be nice if it detected that all possible values are masked.
Examples
No response
Output message
REQUIRED_USE can't be satisfied because of masked/forced flags
Documentation
The REQUIRED_USE constraints cannot be satisfied because all the flags that could satisfy it are masked and/or forced.
Result level
error
Hmm, I'm not sure how possible it is, unless I miss some simple (partial?) solution:
- This needs to go over all profiles, meaning it should be most likely inside
VisibilityCheck - This needs to see if the REQUIRED_USE expr can be satisfied after limitation of profile "masks". Yes, we could use here the solver
pkgdev tattuses to find solution to REQUIRED_USE, but it isn't fast enough. The matrix here is ALL_PKG_VERSIONS x ALL_PROFILES, and expect run time of 10ms for trivial ebuilds or >2s for the complicated once. This translates into hours running on all the repo - not good enough.