public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: function-reference/install-functions/
Date: Fri, 22 Nov 2019 22:45:12 +0000 (UTC)	[thread overview]
Message-ID: <1574429476.401ad3ebcf88837618fa559c5cea7666a4b30435.mjo@gentoo> (raw)

commit:     401ad3ebcf88837618fa559c5cea7666a4b30435
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 25 00:39:30 2019 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Nov 22 13:31:16 2019 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=401ad3eb

function-reference/install-functions: clarify dodir/keepdir usage.

The existing "Install Functions Reference" documentation on dodir()
and keepdir() is a bit wishy-washy. What developers really want to
know is, when do I use one, and when do I use the other?

This commit updates the descriptions of those two functions to provide
that information. If the directory will be non-empty, dodir() is fine.
Otherwise, keepdir() should be used. Some rationale for the existence
of the keepdir() function is also provided for the skeptical developer
who might otherwise find it superfluous.

This change mirrors an update to the ebuild(5) man page in portage.

Closes: https://bugs.gentoo.org/451472
Reported-by: Matthew Schultz <mattsch <AT> gmail.com>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 function-reference/install-functions/text.xml | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/function-reference/install-functions/text.xml b/function-reference/install-functions/text.xml
index 2b0cbf2..06bc241 100644
--- a/function-reference/install-functions/text.xml
+++ b/function-reference/install-functions/text.xml
@@ -117,7 +117,9 @@ the first is the source name, the second the name to use when installing.
       <c>dodir</c>
     </ti>
     <ti>
-      Install a directory
+      Install a directory that will be non-empty when the package is
+      merged. For directories that will be empty, please use
+      <c>keepdir</c> instead.
     </ti>
   </tr>
   <tr>
@@ -288,9 +290,15 @@ the first is the source name, the second the name to use when installing.
       <c>keepdir</c>
     </ti>
     <ti>
-      Create a directory which will be preserved by the package
-      manager (This is typically accomplished by inserting an empty
-      <c>.keep_${CATEGORY}_${PN}-${SLOT%/*}</c> file in the directory)
+      Install a directory that will be empty when the package is
+      merged. This is like <c>dodir</c>, but for empty directories
+      instead. <uri
+      link="https://projects.gentoo.org/pms/7/pms.html#x1-14200013.2.2">The
+      handling of empty directories is undefined by the package
+      manager specification</uri>, and the <c>keepdir</c> function
+      exists to ensure that the (otherwise empty) directory is
+      tracked. This is accomplished by installing a hidden file
+      prefixed with <c>.keep</c> to the directory in question.
     </ti>
   </tr>
   <tr>


             reply	other threads:[~2019-11-22 22:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 22:45 Michael Orlitzky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-21 19:06 [gentoo-commits] proj/devmanual:master commit in: function-reference/install-functions/ Ulrich Müller
2023-05-27 18:51 Ulrich Müller
2023-04-29 15:29 Ulrich Müller
2022-01-17 16:52 Ulrich Müller
2020-02-24  8:14 Ulrich Müller
2018-10-24 13:01 Brian Evans
2018-10-24 13:01 Brian Evans
2018-08-01 22:59 Göktürk Yüksek
2018-06-22 18:25 Ulrich Müller
2017-08-28 20:01 Göktürk Yüksek
2017-06-21 17:28 Göktürk Yüksek
2016-12-08 16:47 Göktürk Yüksek
2016-12-07 19:46 Göktürk Yüksek
2016-12-07 19:46 Göktürk Yüksek
2016-11-30  5:29 Göktürk Yüksek
2016-10-04 12:02 Göktürk Yüksek
2016-10-03 14:52 Ulrich Müller
2016-10-03 14:52 Ulrich Müller
2016-10-03 13:45 Mike Gilbert
2016-08-18  3:26 Göktürk Yüksek
2013-02-10  3:26 Mike Gilbert
2012-11-07 13:43 Michael Palimaka

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=1574429476.401ad3ebcf88837618fa559c5cea7666a4b30435.mjo@gentoo \
    --to=mjo@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