Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer
Date: Mon, 13 Nov 2017 15:10:48
Message-Id: 029c5cc8-c85c-a0b8-ff14-af25dc5e6a78@gentoo.org
In Reply to: Re: [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer by "Michał Górny"
1 On 11/12/2017 08:43 AM, Michał Górny wrote:
2 >
3 > I'm not convinced a QA warning is valid, given that not every empty
4 > directory is meaningful. You're going to either cause people to create
5 > unnecessary 'keepdir's, or to be swamped by false positives.
6
7 The warning would essentially be saying, "you installed this empty
8 directory, do you need it?" Granted, it would be annoying if the answer
9 was "no" and if my package triggered thirty of them, but then that's a
10 bug (possibly upstream) that should be reported and fixed. On the other
11 hand, if you need the directory, then you should be calling "keepdir" on
12 it -- so in either case I don't think the warning is a false positive.
13
14
15 >> * Have portage call its keepdir code on any empty directories in $D
16 >> between src_install and pkg_preinst.
17 >
18 > How does this account for /run and other non-persistent locations?
19
20 What specific problem do you foresee?
21
22 The implementation above should be no worse than what we have. Right
23 now, there are a lot of ebuilds that are installing empty directories.
24 Those ebuilds are buggy in one way or another: either relying on
25 undefined behavior, or creating unused directories for no reason. (Many
26 of the first type are not easily fixed, since the upstream build system
27 creates them.) The "automatic keepdir" would still create unused
28 directories, but it would fix the directories that should have been
29 keepdir'd but weren't.
30
31 This presents the usual problems with /run, but none that we don't
32 already have. Ebuilds that create directories under /run already receive
33 a QA warning not to do that, and those directories are already clobbered
34 on a reboot; that doesn't change. If a package like baselayout wants to
35 create an empty /run, it can do so in pkg_postinst to avoid the ".keep"
36 file. What else am I missing?
37
38
39 >> * Change the PMS to remove "undefined behavior" and replace it with
40 >> "empty directories must be tracked, and may only be removed once no
41 >> installed package is using them," or something along those lines.
42 >> That leaves the implementation up to the PM.
43 >
44 > ...and makes interoperability between different package managers
45 > impossible, defeating the purpose of PMS in the first place.
46
47 Well, that's why I'm asking.. I don't know WTF I'm doing, but I'd still
48 like the proposal to be decent when I give it to the people who do.