1 |
commit: 7becf8322c2e53b484faa5565df3c3fcde2be85d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 19 13:53:05 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 19 20:10:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/policy-guide.git/commit/?id=7becf832 |
7 |
|
8 |
dependencies: =-deps with no revision |
9 |
|
10 |
Closes: https://bugs.gentoo.org/705842 |
11 |
Closes: https://github.com/gentoo/policy-guide/pull/6 |
12 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
13 |
|
14 |
dependencies.rst | 28 ++++++++++++++++++++++++++++ |
15 |
1 file changed, 28 insertions(+) |
16 |
|
17 |
diff --git a/dependencies.rst b/dependencies.rst |
18 |
index ff6756f..51038be 100644 |
19 |
--- a/dependencies.rst |
20 |
+++ b/dependencies.rst |
21 |
@@ -30,6 +30,34 @@ This is especially important for packages that take long time to build. |
22 |
by the Council but no reference implementation has been written. |
23 |
|
24 |
|
25 |
+.. index:: dependency; = with no revision |
26 |
+ |
27 |
+=-dependencies with no revision |
28 |
+------------------------------- |
29 |
+:Source: QA |
30 |
+:Reported: by repoman and pkgcheck |
31 |
+ |
32 |
+Whenever a non-wildcard ``=`` (equals) dependency is used on a package, |
33 |
+the requested revision must be specified explicitly. When the zeroth |
34 |
+revision is requested, ``-r0`` must be used. When no specific revision |
35 |
+is necessary, the ``~`` (tilde) operator must be used instead. |
36 |
+ |
37 |
+*Example*:: |
38 |
+ |
39 |
+ # BAD: |
40 |
+ =dev-libs/libfrobnicate-1.2.3 |
41 |
+ # GOOD: |
42 |
+ =dev-libs/libfrobnicate-1.2.3-r0 |
43 |
+ =dev-libs/libfrobnicate-1.2.3-r3 |
44 |
+ ~dev-libs/libfrobnicate-1.2.3 |
45 |
+ |
46 |
+*Rationale*: using ``=`` operator in place of ``~`` to mean a specific |
47 |
+version has been a common mistake. This policy uses the fact that |
48 |
+no revision and explicit ``-r0`` are equivalent. By explicitly |
49 |
+requesting the latter, it warns developers to reconsider whether they |
50 |
+used the correct operator. |
51 |
+ |
52 |
+ |
53 |
.. index:: |
54 |
pair: slot/subslot; dependency |