Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Michael Orlitzky <mjo@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH v2] install-qa-check: Do not install empty directories
Date: Wed, 10 Jan 2018 21:38:49
Message-Id: 4c73ca55-3cda-9bff-9a20-121e30579c85@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH v2] install-qa-check: Do not install empty directories by Michael Orlitzky
1 On 01/10/2018 01:15 PM, Michael Orlitzky wrote:
2 > On 01/10/2018 03:55 PM, Zac Medico wrote:
3 >>>
4 >>> This is going to break a lot of packages whose build systems create e.g.
5 >>> /var/lib/foo and do nothing with it immediately. The ebuild should be
6 >>> calling keepdir on those paths, but how would anyone know that?
7 >>
8 >> If we consider that portage already removes these directories if they
9 >> are still empty when the package is re-merged or upgraded, then maybe
10 >> the risk is low enough?
11 >>
12 >
13 > Does it? (Are we talking about the same thing?)
14 >
15 > For example, the nagios-core build system creates a bunch of empty
16 > directories under /var/nagios:
17 >
18 > $ find /var/nagios
19 > /var/nagios
20 > /var/nagios/rw
21 > /var/nagios/home
22 > /var/nagios/spool
23 > /var/nagios/spool/checkresults
24 > /var/nagios/archives
25 >
26 > Re-emerging the same version of nagios-core doesn't kill them off.
27
28 Oh, you're right, I was mistaken. It's possible that the behavior
29 changed at some point, but currently it protects directories installed
30 by the new instance, as shown here:
31
32 --- replaced dir /var/nagios/spool/checkresults
33 --- replaced dir /var/nagios/spool
34 --- replaced dir /var/nagios/rw
35 --- replaced dir /var/nagios/archives
36 --- replaced dir /var/nagios
37 --
38 Thanks,
39 Zac