From d37fc22f87656c181a37c18091ff802fb4af721d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 24 Apr 2019 20:39:30 -0400 Subject: [PATCH 1/1] 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 --- function-reference/install-functions/text.xml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/function-reference/install-functions/text.xml b/function-reference/install-functions/text.xml index 2b0cbf2..6088cee 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. dodir - Install a directory + Install a directory that will be non-empty when the package is + merged. For directories that will be empty, please use + keepdir instead. @@ -288,9 +290,13 @@ the first is the source name, the second the name to use when installing. keepdir - Create a directory which will be preserved by the package - manager (This is typically accomplished by inserting an empty - .keep_${CATEGORY}_${PN}-${SLOT%/*} file in the directory) + Install a directory that will be empty when the package is + merged. This is like dodir, but for empty directories + instead. As of EAPI 7, the + handling of empty directories is undefined by the package + manager specification, and the keepdir function + exists to ensure that the (otherwise empty) directory is tracked. -- 2.21.0