1 |
commit: 0719b0f628b12a542b4e9b3327ab493c0e1daf76 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 19 20:29:58 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 21 16:47:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/policy-guide.git/commit/?id=0719b0f6 |
7 |
|
8 |
dependencies: policy on 4-style USE deps |
9 |
|
10 |
Closes: https://bugs.gentoo.org/705890 |
11 |
Closes: https://github.com/gentoo/policy-guide/pull/8 |
12 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
13 |
|
14 |
dependencies.rst | 41 +++++++++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 41 insertions(+) |
16 |
|
17 |
diff --git a/dependencies.rst b/dependencies.rst |
18 |
index 38f4147..55bba5c 100644 |
19 |
--- a/dependencies.rst |
20 |
+++ b/dependencies.rst |
21 |
@@ -167,5 +167,46 @@ dependencies as a result. |
22 |
if the package installed by the user still links to libfoo. |
23 |
|
24 |
|
25 |
+.. index:: |
26 |
+ pair: USE flags; dependency |
27 |
+ |
28 |
+USE dependencies |
29 |
+---------------- |
30 |
+ |
31 |
+on packages without the flag |
32 |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
33 |
+:Source: QA (inferred from PMS) |
34 |
+:Reported: by pkgcheck |
35 |
+ |
36 |
+Whenever a package uses a 2-style USE-dependency on another package, |
37 |
+all package versions matching the dependency must have the flag |
38 |
+in question. If the dependency matches at least one version missing |
39 |
+the flag, either 4-style USE-dependency (i.e. having ``(-)`` or ``(+)`` |
40 |
+indicator) must be used, or the restriction must be refined to match |
41 |
+only versions having the flag. |
42 |
+ |
43 |
+*Example*:: |
44 |
+ |
45 |
+ # BAD: USE=gtk2 is not supported by v2 |
46 |
+ dev-foo/libfrobnicate[gtk2] |
47 |
+ # GOOD: all matching versions have USE=tools |
48 |
+ <dev-foo/libfrobnicate-2[gtk2] |
49 |
+ # GOOD: indicate the default |
50 |
+ dev-foo/libfrobnicate[gtk2(-)] |
51 |
+ |
52 |
+ # BAD: USE=tools is no longer needed with v2 |
53 |
+ dev-foo/libbar[tools] |
54 |
+ # GOOD: indicate the default |
55 |
+ dev-foo/libbar[tools(+)] |
56 |
+ |
57 |
+*Rationale*: according to the PMS section on `2-style and 4-style USE |
58 |
+dependencies`_, it is an error to apply 2-style USE dependency to |
59 |
+a package missing the flag. Furthermore, checking for this makes it |
60 |
+possible to report whenever USE flags on a package are changed without |
61 |
+updating its reverse dependencies. |
62 |
+ |
63 |
+ |
64 |
.. _GLEP 62: https://www.gentoo.org/glep/glep-0062.html |
65 |
.. _Paludis: https://paludis.exherbo.org/ |
66 |
+.. _2-style and 4-style USE dependencies: |
67 |
+ https://projects.gentoo.org/pms/7/pms.html#x1-790008.2.6.4 |