From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer
Date: Sat, 11 Nov 2017 08:58:25 +0100 [thread overview]
Message-ID: <1510387105.1210.2.camel@gentoo.org> (raw)
In-Reply-To: <05c08f65-3cf6-67f4-621e-cf210fe2a82c@gentoo.org>
W dniu pią, 10.11.2017 o godzinie 19∶21 -0500, użytkownik Michael
Orlitzky napisał:
> On 11/10/2017 04:36 PM, Damo Brisbane wrote:
> >
> > Re for...keepdir, I found removing it then the /var/log/fabio folders
> > were not getting created, so keeping it in there.
>
> You need to tell the ebuild to create that directory one way or another.
> The "dodir" function will create the directory, but without the ".keep"
> file inside of it. However that may be "illegal" in this case; see below.
>
>
> > http://www.calculate-linux.org/main/en/using_ebuild, says this of *keepdir*:
> >
> > *Creates (if necessary) a |.keep| file in the given directory so that it
> > isn't auto-cleaned. Never create a |.keep| file yourself. If Portage
> > changes how |keepdir| works, then creating the file yourself will break
> > the package.*
>
> To my knowledge, no package manager will remove a non-empty directory,
> nor will it remove anything that the package manager did not itself
> create. To me that raises a question: why would I ever want to keep
> around an (otherwise empty) directory that was created by the package
> manager?
>
> I found this,
>
> https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-15100013.2.2
>
> which states
>
> Behaviour upon encountering an empty directory is undefined. Ebuilds
> must not attempt to install an empty directory.
>
> Certainly "keepdir" will make the directory non-empty, but with the
> additional (unwanted) side-effect that the directory won't be removed
> when the package is uninstalled. Thus "keepdir" doesn't seem like it was
> intended to address that technicality. So, I have two questions now...
Wrong. It creates a dotfile inside it, and removes it along with it.
>
> a) When would you want to use keepdir?
Because it works.
>
> b) What's the right way to prevent a directory from being empty? Touch
> a dummy file?
Use keepdir.
>
> and a meta-question,
>
> c) Seriously, empty directories are undefined behavior?
...and how could they be defined if a directory can be installed by
multiple packages and has no explicit ownership?
--
Best regards,
Michał Górny
next prev parent reply other threads:[~2017-11-11 7:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 4:08 [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer Damo Brisbane
2017-11-10 12:59 ` Michael Orlitzky
2017-11-10 21:36 ` Damo Brisbane
2017-11-11 0:21 ` Michael Orlitzky
2017-11-11 7:58 ` Michał Górny [this message]
2017-11-11 17:31 ` Michael Orlitzky
2017-11-11 19:26 ` Michał Górny
2017-11-12 12:53 ` Michael Orlitzky
2017-11-12 13:43 ` Michał Górny
2017-11-13 15:10 ` Michael Orlitzky
2017-11-12 15:21 ` Ulrich Mueller
2017-11-13 15:16 ` Michael Orlitzky
2017-11-11 19:54 ` Brian Dolbec
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=1510387105.1210.2.camel@gentoo.org \
--to=mgorny@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