Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668214 - =sys-apps/openrc-0.38.2 - openrc-run checkpath missing support of -p (--parents) option mkdir
Summary: =sys-apps/openrc-0.38.2 - openrc-run checkpath missing support of -p (--paren...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: OpenRC Team
Depends on:
Reported: 2018-10-10 11:27 UTC by Sergey S. Starikoff
Modified: 2018-10-19 09:51 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Sergey S. Starikoff 2018-10-10 11:27:24 UTC
OpenRC provides a special built-in function to create directories (checkpath).
But this function works as mkdir command, i.e. just creates a directory, failing when need to create not only target directory but at least one intermediate.
Although init scripts usually use such case: not simple mkdir invocation, but mkdir -p.

So, we need either to add checkpath option, like --parents for mkdir, or switch checkpath command in this mode.

Tested with recently stable =sys-apps/openrc-0.38.2.
Comment 1 William Hubbs gentoo-dev 2018-10-18 16:30:01 UTC
My concern about doing this is how the -o and -m options should work in
this scenario.  For example, consider the following command:

checkpath --owner user:group --mode 0700 --parents /foo/bar/bas/end

The actions of --owner and --mode become ambiguous in that situation.
Is this an error? If not, which directories in the example should they
apply to?
Comment 2 Beelzebubbie 2018-10-19 09:51:59 UTC
My opinion we should do the same as mkdir -p (--mode option), but extending it for owner. Yes, some ambiguities are unavoidable, but in most cases explicit applying mode and owner to the last dir in path is enough.