Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 471658

Summary: [Future EAPI] A way to declare 'soft' dependencies of USE flags (unlike REQUIRED_USE)
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: esigra, pacho, python
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=424283
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-29 06:56:22 UTC
REQUIRED_USE supports only declaring 'hard' dependencies of two USE flags -- that is, 'foo? ( bar )' makes PM fail if USE='-bar foo' and require him to adjust the flags. This is mostly expected but there are cases when the enforcing flags are set in the profile.

For example, if a package that has an optional dep on Python stated:

  REQUIRED_USE="!python? ( !python_targets_... )"

to express that PYTHON_TARGETS are meaningless without USE=python, PM would require user to unset all Python targets on the package which is not really helpful.

What I would see is a 'soft' counterpart to REQUIRED_USE. For example:

  MEANINGFUL_USE="!python ( !python_targets_... )"

would solely 'gray out' PYTHON_TARGETS and avoid rebuilding the package on PYTHON_TARGETS change when USE=-python is used.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-06 15:35:51 UTC
Runtime USE flags can serve as 'good enough' replacement.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-02-14 12:34:19 UTC
I'm going to roll out a more complete proposal for this.