1 |
On Thu, 2013-01-03 at 00:25 -0500, Rick "Zero_Chaos" Farina wrote: |
2 |
> On 01/03/2013 12:06 AM, Michał Górny wrote: |
3 |
> > On Wed, 02 Jan 2013 19:49:02 -0800 |
4 |
> > ""Paweł Hajdan, Jr."" <phajdan.jr@g.o> wrote: |
5 |
> > |
6 |
> >> It came up again with <https://bugs.gentoo.org/show_bug.cgi?id=449918>, |
7 |
> >> and I think it's worth to think about a better fix. I still keep hitting |
8 |
> >> mysterious collisions with orphaned files from time to time. |
9 |
> >> |
10 |
> >> How about switching the developer profile from collision-protect to |
11 |
> >> protect-owned, and proceeding with enabling protect-owned by default for |
12 |
> >> all profiles? (not all developers are using the developer profile) |
13 |
> > |
14 |
> > Well, it all depends. |
15 |
> > |
16 |
> > protect-owned is easy and lazy. You just get errors on package |
17 |
> > collisions, care about nothing else. |
18 |
> > |
19 |
> > collision-protect cares about every collision. It can help you notice |
20 |
> > that *your* package lefts orphaned files for some reason or writes |
21 |
> > where it is not supposed to write. |
22 |
> > |
23 |
> In the years I ran collision-protect I can say it prevented hundreds of |
24 |
> merges of linux-firmware (because the kernel also installs firmware) and |
25 |
> not much else. |
26 |
> |
27 |
> Would you be able to share more specific insight on how |
28 |
> collision-protect helped protect files that need to be protected where |
29 |
> protect-owned would have been inferior? |
30 |
|
31 |
It protects files that cannot be owned by any one package, but must still |
32 |
be protected, for example /usr/share/glib-2.0/schemas/gschemas.compiled |
33 |
|
34 |
This file contains the compiled database of all your gsettings schemas. |
35 |
It needs to be updated by running glib-compile-schemas every time you |
36 |
install or remove a gsettings schemas xml file. Ebuilds for glib-based |
37 |
stuff have to run glib-compile-schemas in pkg_postinst(), and the |
38 |
gschemas.compiled must remain outside package manager control. |
39 |
|
40 |
However, some packages' build systems have "make" or "make install" call |
41 |
glib-compile-schemas by default. A careless developer who doesn't use |
42 |
collision-protect *and* doesn't pay attention to protect-owned's warning |
43 |
messages might accidentally allow his ebuild to compile and install |
44 |
/usr/share/glib-2.0/schemas/gschemas.compiled in src_install(), marking |
45 |
the file as owned by his ebuild. When his ebuild is uninstalled, the |
46 |
gschemas.compiled file would be removed, breaking the system. |