1 |
On Wed, 2021-06-23 at 12:40 +0200, Ulrich Mueller wrote: |
2 |
> > > > > > On Wed, 23 Jun 2021, Fabian Groffen wrote: |
3 |
> |
4 |
> > On 23-06-2021 08:47:58 +0200, Ulrich Mueller wrote: |
5 |
> > > It's somewhat hidden, but it's there: |
6 |
> > > https://projects.gentoo.org/pms/8/pms.html#x1-950009.1.10 |
7 |
> > > |
8 |
> > > 9.1.10 pkg_preinst |
9 |
> > > ... immediately before merging the package to the live filesystem. |
10 |
> > > ... |
11 |
> > > |
12 |
> > > 9.1.11 pkg_postinst |
13 |
> > > ... immediately after merging the package to the live filesystem. |
14 |
> > > ... |
15 |
> |
16 |
> > Aha, so does this mean pkg_prerm and pkg_postrm are run with |
17 |
> > replacing |
18 |
> > package in place, e.g. if they refer to scripts installed by the |
19 |
> > replaced package they may no longer exist or be the same? |
20 |
> |
21 |
> PMS has similar wording for pkg_prerm and pkg_postrm, so (at least |
22 |
> according to the spec) the old package will still be present in |
23 |
> pkg_prerm and will be gone in pkg_postrm. |
24 |
> |
25 |
> I don't think that the ebuild can rely on any particular status of the |
26 |
> new package in pkg_*rm (of the old package), or the status of the old |
27 |
> package in pkg_*inst (of the new package). |
28 |
|
29 |
I would even say that it can't rely on the particular status of the old |
30 |
package in any case, if it's meant to be removed. In particular, its |
31 |
dependencies can be unmerged before the package itself. |
32 |
|
33 |
-- |
34 |
Best regards, |
35 |
Michał Górny |