From: "Göktürk Yüksek" <gokturk@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/use-flags/
Date: Wed, 22 May 2019 19:37:26 +0000 (UTC) [thread overview]
Message-ID: <1558553647.83e7f6d3a5430c17d234d5eb77685cdd7bc6df6d.gokturk@gentoo> (raw)
commit: 83e7f6d3a5430c17d234d5eb77685cdd7bc6df6d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 13 21:40:22 2019 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed May 22 19:34:07 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=83e7f6d3
general-concepts/use-flags: Split out use cases for not using flags
Split out the paragraph on not using USE flags for runtime dependencies
into a separate section. Include the policy of not using USE flags
for small files.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
general-concepts/use-flags/text.xml | 41 ++++++++++++++++++++++++++++++++-----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/general-concepts/use-flags/text.xml b/general-concepts/use-flags/text.xml
index de61874..c20e8d0 100644
--- a/general-concepts/use-flags/text.xml
+++ b/general-concepts/use-flags/text.xml
@@ -27,6 +27,23 @@ dependency is not detected by the package manager tools and can easily
break, among other issues.
</p>
+<note>
+The status of USE flags is saved in the VDB, and their value in
+<c>pkg_prerm</c> and <c>pkg_postrm</c> is taken from there. This means that
+setting or unsetting a USE flag between merge and unmerge has no effect.
+</note>
+</body>
+
+<section>
+<title>When not to use USE flags?</title>
+<body>
+<p>
+While <c>USE</c> flags are generally considered beneficial to users, there
+are valid use cases for avoiding them. When writing ebuilds, consider whether
+to add flags for particular conditional features, or explore one
+of the alternative solutions described below.
+</p>
+
<p>
The usage of a <c>USE</c> flag should not control runtime dependencies when
the package does not link to it. Doing so will create extra
@@ -35,12 +52,26 @@ change on disk. This should be avoided and instead can be conveyed to the
user via post install messages if needed.
</p>
-<note>
-The status of USE flags is saved in the VDB, and their value in
-<c>pkg_prerm</c> and <c>pkg_postrm</c> is taken from there. This means that
-setting or unsetting a USE flag between merge and unmerge has no effect.
-</note>
+<p>
+<c>USE</c> flags must not be used to control installing files that are small,
+non-intrusive, do not introduce additional build-time dependencies or cause
+a significant increase in build time. Examples of such files are bash completion
+files, init.d scripts, logrotate configuration files, systemd service files.
+The rationale is the same as above. Instead, those files must be installed
+unconditionally.
+</p>
+
+<p>
+A similar case can be made for packages having multiple conditional programs
+or modules. Whenever this results in a large number of <c>USE</c> flags that
+would force the user to spend a lot of time choosing compatible flags
+and possibly rebuilding after incomplete choices, consider reducing the use
+of flags to those programs or modules that have external dependencies
+and/or long build times. The rest of them should be built unconditionally
+instead, or controlled by a flag such as <c>minimal</c>.
+</p>
</body>
+</section>
<section>
<title><c>noblah</c> USE Flags</title>
next reply other threads:[~2019-05-22 19:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 19:37 Göktürk Yüksek [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-09 18:29 [gentoo-commits] proj/devmanual:master commit in: general-concepts/use-flags/ Ulrich Müller
2023-08-22 6:03 Ulrich Müller
2022-02-21 21:40 Sam James
2021-08-01 2:13 Sam James
2021-08-01 2:08 Sam James
2021-04-10 7:03 Ulrich Müller
2021-04-10 7:03 Ulrich Müller
2021-04-10 7:03 Ulrich Müller
2021-04-02 7:00 Ulrich Müller
2019-05-24 8:40 Ulrich Müller
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2018-06-22 18:25 Ulrich Müller
2014-04-06 15:51 Markos Chandras
2012-04-05 14:22 Torsten Veller
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=1558553647.83e7f6d3a5430c17d234d5eb77685cdd7bc6df6d.gokturk@gentoo \
--to=gokturk@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