pkgcore / pkgcheck

pkgcore-based QA utility for ebuild repos
https://pkgcore.github.io/pkgcheck
BSD 3-Clause "New" or "Revised" License
34 stars 29 forks source link

[New Check]: Detect `REQUIRED_USE` that can't be satisfied because of flag masks #689

Open mgorny opened 1 week ago

mgorny commented 1 week ago

Is there an existing such new check request for this?

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

arthurzam commented 1 week ago

Hmm, I'm not sure how possible it is, unless I miss some simple (partial?) solution: