Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710318 - Clarify that insinto will create target dir if missing
Summary: Clarify that insinto will create target dir if missing
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Devmanual Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-02-20 17:05 UTC by Thomas Deutschmann (RETIRED)
Modified: 2020-02-24 16:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
function-reference/install-functions: Explain that *into creates the dir. (0001-function-reference-install-functions-Explain-that-in.patch,1.02 KB, patch)
2020-02-20 19:19 UTC, Ulrich Müller
Details | Diff
function-reference/install-functions: Explain that *into creates the dir. (0001-function-reference-install-functions-Explain-that-in.patch,1.06 KB, patch)
2020-02-20 19:23 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2020-02-20 17:05:32 UTC
CI (pkgcore) throws RedundantDodir warnings when package will do

> dodir /some/path
> insinto /some/path
> newins "${FILESDIR}"/foo bar

However, current documentation (https://devmanual.gentoo.org/function-reference/install-functions/) just says

> insinto:  Change install location for doins, newins

and

> dodir: Install a directory that will be non-empty when the package is merged. For directories that will be empty, please use keepdir instead. 

So it is not clear that insinto will actually take care of creating target directory if missing. And if you are familiar with tools like 'install' which will fail if target directory is missing, the behavior of insinto is unexpected and requires additional documentation.
Comment 1 Mike Gilbert gentoo-dev 2020-02-20 18:44:18 UTC
insinto doesn't create the directory.

doins/newins create any necessary parent directories before copying the files.
Comment 2 Mike Gilbert gentoo-dev 2020-02-20 18:47:48 UTC
Apologies, I am mistaken.
Comment 3 Mike Gilbert gentoo-dev 2020-02-20 18:48:57 UTC
PMS reference: https://projects.gentoo.org/pms/7/pms.html#x1-13000012.3.10
Comment 4 Ulrich Müller gentoo-dev 2020-02-20 19:19:53 UTC
Created attachment 614764 [details, diff]
function-reference/install-functions: Explain that *into creates the dir.

Suggested patch, please review.
Comment 5 Ulrich Müller gentoo-dev 2020-02-20 19:23:31 UTC
Created attachment 614766 [details, diff]
function-reference/install-functions: Explain that *into creates the dir.

Update, with typo fixed.
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2020-02-21 15:17:48 UTC
CC'ing portage team:

Like Mike noted in IRC yesterday, we also need to adjust https://gitweb.gentoo.org/proj/portage.git/tree/man/ebuild.5?h=portage-2.3.89#n1456
Comment 7 Larry the Git Cow gentoo-dev 2020-02-24 08:14:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=054fc8a60b07ce387de5d2cf5467e937431d8183

commit 054fc8a60b07ce387de5d2cf5467e937431d8183
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2020-02-20 19:17:03 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2020-02-24 07:12:39 +0000

    function-reference/install-functions: Explain that *into creates the dir.
    
    Closes: https://bugs.gentoo.org/710318
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

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