Gentoo Archives: gentoo-portage-dev

From: Joakim Tjernlund <Joakim.Tjernlund@××××××××.com>
To: "gentoo-portage-dev@l.g.o" <gentoo-portage-dev@l.g.o>, "mgorny@g.o" <mgorny@g.o>, "grobian@g.o" <grobian@g.o>
Subject: Re: [gentoo-portage-dev] In what phase are file "merged"?
Date: Thu, 05 Aug 2021 22:14:41
Message-Id: 43295802233c5b2e342ab7754c6d644a5ad3ef13.camel@infinera.com
In Reply to: Re: [gentoo-portage-dev] In what phase are file "merged"? by "Michał Górny"
1 On Wed, 2021-06-23 at 13:33 +0200, Michał Górny wrote:
2 > On Wed, 2021-06-23 at 12:40 +0200, Ulrich Mueller wrote:
3 > > > > > > > On Wed, 23 Jun 2021, Fabian Groffen wrote:
4 > >
5 > > > On 23-06-2021 08:47:58 +0200, Ulrich Mueller wrote:
6 > > > > It's somewhat hidden, but it's there:
7 > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprojects.gentoo.org%2Fpms%2F8%2Fpms.html%23x1-950009.1.10&amp;data=04%7C01%7CJoakim.Tjernlund%40infinera.com%7Cba02686be6d54ea9cc9108d9363acdd2%7C285643de5f5b4b03a1530ae2dc8aaf77%7C1%7C1%7C637600448462073359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Jb60QbNzyIAUesXa9Z9YVlaGbbKBVVXK6qK%2BgiZ87%2BM%3D&amp;reserved=0
8 > > > >
9 > > > > 9.1.10 pkg_preinst
10 > > > > ... immediately before merging the package to the live
11 > > > > filesystem.
12 > > > > ...
13 > > > >
14 > > > > 9.1.11 pkg_postinst
15 > > > > ... immediately after merging the package to the live filesystem.
16 > > > > ...
17 > >
18 > > > Aha, so does this mean pkg_prerm and pkg_postrm are run with
19 > > > replacing
20 > > > package in place, e.g. if they refer to scripts installed by the
21 > > > replaced package they may no longer exist or be the same?
22 > >
23 > > PMS has similar wording for pkg_prerm and pkg_postrm, so (at least
24 > > according to the spec) the old package will still be present in
25 > > pkg_prerm and will be gone in pkg_postrm.
26 > >
27 > > I don't think that the ebuild can rely on any particular status of
28 > > the
29 > > new package in pkg_*rm (of the old package), or the status of the old
30 > > package in pkg_*inst (of the new package).
31 >
32 > I would even say that it can't rely on the particular status of the old
33 > package in any case, if it's meant to be removed.  In particular, its
34 > dependencies can be unmerged before the package itself.
35
36 Stubled ove this mail again and noticed "its dependencies can be
37 unmerged before the package itself" stmt. That does not make sense to
38 me. Deps should be unmerged after any pkg that depends on them?
39
40 Jocke

Replies

Subject Author
Re: [gentoo-portage-dev] In what phase are file "merged"? Ulrich Mueller <ulm@g.o>