Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Of death and prerm
Date: Wed, 30 Aug 2017 09:25:42
Message-Id: 1504085131.22591.6.camel@gentoo.org
In Reply to: [gentoo-dev] Of death and prerm by Michael Orlitzky
1 W dniu wto, 29.08.2017 o godzinie 16∶38 -0400, użytkownik Michael
2 Orlitzky napisał:
3 > What should happen if an ebuild calls "die" in pkg_prerm?
4
5 Horrible things, I suppose. If something started uninstalling,
6 and failed during uninstall the system integrity is compromised
7 and user needs to perform manual recovery.
8
9 > The issue arose while trying to create a package that could not be
10 > uninstalled except as part of an upgrade. The first thing that came to
11 > mind was to have it die in pkg_prerm.
12
13 This package does not belong in Gentoo. We do packaging, not some ugly
14 malware that prevents users from uninstalling itself. Every package must
15 be uninstallable. Even if it destroys my system, developers have no
16 right to prevent valid uninstall action from proceeding.
17
18 > What portage does is *appear* to crash, but then continue along as if
19 > nothing happened.
20
21 That's probably because it wants to prevent the user from being unable
22 to uninstall the package, e.g. if prerm partially succeeded which means
23 every successive invocation would fail due to some prerm actions being
24 done already.
25
26 > Does the PMS cover this indirectly? (Is there a reliable way to make
27 > package removal fail?)
28
29 No. PMS never covered shooting yourself in the foot, it's not meant to
30 be fool-proof and we don't have the resources to cover every possible
31 bad idea Gentoo developers might come up with. Or the ability to predict
32 their insanity.
33
34 --
35 Best regards,
36 Michał Górny

Replies

Subject Author
Re: [gentoo-dev] Of death and prerm Michael Orlitzky <mjo@g.o>