diff options
author | 2020-01-21 17:50:15 +0100 | |
---|---|---|
committer | 2020-01-21 17:50:15 +0100 | |
commit | 1c3af501fc36ffcc6c550eff70f422de9c45d217 (patch) | |
tree | dc56b9db7442364efb9999606656c663e7649e15 /_sources | |
parent | Update wrt =-dep and abs symlink policies (diff) | |
download | policy-guide-1c3af501fc36ffcc6c550eff70f422de9c45d217.tar.gz policy-guide-1c3af501fc36ffcc6c550eff70f422de9c45d217.tar.bz2 policy-guide-1c3af501fc36ffcc6c550eff70f422de9c45d217.zip |
optfeature & USE-deps
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to '_sources')
-rw-r--r-- | _sources/dependencies.rst.txt | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/_sources/dependencies.rst.txt b/_sources/dependencies.rst.txt index 51038be..55bba5c 100644 --- a/_sources/dependencies.rst.txt +++ b/_sources/dependencies.rst.txt @@ -16,8 +16,9 @@ being nonfunctional unless at least one of a set of optional runtime dependencies is installed. There is no specific preference as to how user should be informed -of optional runtime dependencies. The two possible options include -using ``elog`` messages and ``readme.gentoo-r1`` eclass. +of optional runtime dependencies. Three possible ways are +``optfeature`` from ``eutils`` eclass, ``readme.gentoo-r1`` eclass +and plain ``elog`` messages. *Rationale*: toggling USE flags in order to enable or disable optional runtime dependencies causes needless rebuilds of packages in question. @@ -166,5 +167,46 @@ dependencies as a result. if the package installed by the user still links to libfoo. +.. index:: + pair: USE flags; dependency + +USE dependencies +---------------- + +on packages without the flag +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +:Source: QA (inferred from PMS) +:Reported: by pkgcheck + +Whenever a package uses a 2-style USE-dependency on another package, +all package versions matching the dependency must have the flag +in question. If the dependency matches at least one version missing +the flag, either 4-style USE-dependency (i.e. having ``(-)`` or ``(+)`` +indicator) must be used, or the restriction must be refined to match +only versions having the flag. + +*Example*:: + + # BAD: USE=gtk2 is not supported by v2 + dev-foo/libfrobnicate[gtk2] + # GOOD: all matching versions have USE=tools + <dev-foo/libfrobnicate-2[gtk2] + # GOOD: indicate the default + dev-foo/libfrobnicate[gtk2(-)] + + # BAD: USE=tools is no longer needed with v2 + dev-foo/libbar[tools] + # GOOD: indicate the default + dev-foo/libbar[tools(+)] + +*Rationale*: according to the PMS section on `2-style and 4-style USE +dependencies`_, it is an error to apply 2-style USE dependency to +a package missing the flag. Furthermore, checking for this makes it +possible to report whenever USE flags on a package are changed without +updating its reverse dependencies. + + .. _GLEP 62: https://www.gentoo.org/glep/glep-0062.html .. _Paludis: https://paludis.exherbo.org/ +.. _2-style and 4-style USE dependencies: + https://projects.gentoo.org/pms/7/pms.html#x1-790008.2.6.4 |