Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
mgorny opened this issue Jun 24, 2024 · 1 comment
Open
1 task done
Labels

Comments

@mgorny
Copy link
Contributor

mgorny commented Jun 24, 2024

Is there an existing such new check request for this?

  • 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

@mgorny mgorny added the check label Jun 24, 2024
@arthurzam
Copy link
Member

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 tatt uses 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants