public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/policy-guide:master commit in: /
Date: Tue, 21 Jan 2020 16:49:38 +0000 (UTC)	[thread overview]
Message-ID: <1579625268.0719b0f628b12a542b4e9b3327ab493c0e1daf76.mgorny@gentoo> (raw)

commit:     0719b0f628b12a542b4e9b3327ab493c0e1daf76
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 20:29:58 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 21 16:47:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/policy-guide.git/commit/?id=0719b0f6

dependencies: policy on 4-style USE deps

Closes: https://bugs.gentoo.org/705890
Closes: https://github.com/gentoo/policy-guide/pull/8
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dependencies.rst | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/dependencies.rst b/dependencies.rst
index 38f4147..55bba5c 100644
--- a/dependencies.rst
+++ b/dependencies.rst
@@ -167,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


             reply	other threads:[~2020-01-21 16:49 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 16:49 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-18 12:59 [gentoo-commits] proj/policy-guide:master commit in: / Ulrich Müller
2023-09-01 10:31 Michał Górny
2023-08-17 21:46 Ulrich Müller
2023-08-17 20:56 Ulrich Müller
2023-01-18 17:28 Ulrich Müller
2023-01-14 18:46 Sam James
2023-01-14 18:46 Sam James
2023-01-14 18:46 Sam James
2023-01-14 18:46 Sam James
2023-01-14 18:34 Ulrich Müller
2023-01-14 17:31 Ulrich Müller
2023-01-14 16:45 Ulrich Müller
2023-01-14 16:45 Ulrich Müller
2023-01-14 16:45 Ulrich Müller
2022-04-29 11:15 Ulrich Müller
2022-04-24  8:20 Ulrich Müller
2021-11-15 13:10 Ulrich Müller
2021-11-15  4:19 Sam James
2021-08-15  6:31 Michał Górny
2021-01-26 18:48 Ulrich Müller
2021-01-26 18:43 Ulrich Müller
2020-11-06 22:24 Michał Górny
2020-09-13  7:00 Michał Górny
2020-03-05  7:59 Michał Górny
2020-03-02  5:22 Michał Górny
2020-02-25 15:16 Michał Górny
2020-02-21 11:07 Michał Górny
2020-02-21 11:07 Michał Górny
2020-01-26  4:46 Michał Górny
2020-01-22  3:33 Michał Górny
2020-01-22  3:33 Michał Górny
2020-01-22  3:33 Michał Górny
2020-01-21 16:46 Michał Górny
2020-01-19 20:10 Michał Górny
2020-01-19 20:10 Michał Górny
2020-01-19 10:52 Michał Górny
2020-01-19 10:52 Michał Górny
2020-01-19 10:52 Michał Górny
2020-01-13 19:33 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579625268.0719b0f628b12a542b4e9b3327ab493c0e1daf76.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox