Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 273642 - USE is calculated differently (EAPI 5)
Summary: USE is calculated differently (EAPI 5)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 431026
  Show dependency tree
 
Reported: 2009-06-10 20:24 UTC by Sebastian Luther (few)
Modified: 2012-12-17 18:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Luther (few) 2009-06-10 20:24:35 UTC
This bug tracks the implementation of the EAPI 3 feature mentioned in the summary.
Comment 1 Jonathan Callen (RETIRED) gentoo-dev 2009-10-17 21:56:07 UTC
From PMS:

12.1.1  USE and IUSE Handling

This section discusses the handling of four variables:

IUSE
    is the variable calculated from the IUSE values defined in ebuilds and eclasses. 
IUSE_REFERENCEABLE
    is a variable calculated from IUSE and a variety of other sources described below. It is purely a conceptual variable; it is not exported to the ebuild environment. Values in IUSE_REFERENCEABLE may legally be used in queries from other packages about an ebuild's state (for example, for use dependencies). 
IUSE_EFFECTIVE
    is another conceptual, unexported variable. Values in IUSE_EFFECTIVE are those which an ebuild may legally use in queries about itself (for example, for the use function, and for use in dependency specification conditional blocks).
USE
    is a variable calculated by the package manager and exported to the ebuild environment.

In all cases, the values of IUSE_REFERENCEABLE and IUSE_EFFECTIVE are undefined during metadata generation.

For EAPIs listed in table 5.1 as not supporting profile defined IUSE injection, IUSE_REFERENCEABLE is equal to the calculated IUSE value. For EAPIs where profile defined IUSE injection is supported, IUSE_REFERENCEABLE is equal to IUSE_EFFECTIVE.

For EAPIs listed in table 5.1 as not supporting profile defined IUSE injection, IUSE_EFFECTIVE contains the following values:

* All values in the calculated IUSE value.
* All possible values for the ARCH variable.
* All legal use flag names whose name starts with the lowercase equivalent of any value in the profile USE_EXPAND variable followed by an underscore.

For EAPIs listed in table 5.1 as supporting profile defined IUSE injection, IUSE_EFFECTIVE contains the following values:

* All values in the calculated IUSE value.
* All values in the profile IUSE_IMPLICIT variable.
* All values in the profile variable named USE_EXPAND_VALUES_${v}, where ${v} is any value in the intersection of the profile USE_EXPAND_UNPREFIXED and USE_EXPAND_IMPLICIT variables.
* All values for ${lower_v}_${x}, where ${x} is all values in the profile variable named USE_EXPAND_VALUES_${v}, where ${v} is any value in the intersection of the profile USE_EXPAND and USE_EXPAND_IMPLICIT variables and ${lower_v} is the lowercase equivalent of ${v}.

The USE variable is set by the package manager. For each value in IUSE_EFFECTIVE, USE shall contain that value if the flag is to be enabled for the ebuild in question, and shall not contain that value if it is to be disabled. In EAPIs listed in table 5.1 as not supporting profile defined IUSE injection, USE may contain other flag names that are not relevant for the ebuild.

For EAPIs listed in table 5.1 as supporting profile defined IUSE injection, the variables named in USE_EXPAND and USE_EXPAND_UNPREFIXED shall have their profile-provided values reduced to contain only those values that are present in IUSE_EFFECTIVE.

For EAPIs listed in table 5.1 as supporting profile defined IUSE injection, the package manager must save the calculated value of IUSE_EFFECTIVE when installing a package. Details are beyond the scope of this specification.
Comment 2 Zac Medico gentoo-dev 2012-12-17 18:48:14 UTC
This finally made it into EAPI 5.