Re: In what phase are file "merged"?

Ulrich Mueller <[email protected]> Wed, 23 Jun 2021 12:40:21 +0200
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <[email protected]>
>>>>> On Wed, 23 Jun 2021, Fabian Groffen wrote:

> On 23-06-2021 08:47:58 +0200, Ulrich Mueller wrote:
>> It's somewhat hidden, but it's there:
>> https://projects.gentoo.org/pms/8/pms.html#x1-950009.1.10
>> 
>> 9.1.10 pkg_preinst
>> ... immediately before merging the package to the live filesystem. ...
>> 
>> 9.1.11 pkg_postinst
>> ... immediately after merging the package to the live filesystem. ...

> Aha, so does this mean pkg_prerm and pkg_postrm are run with replacing
> package in place, e.g. if they refer to scripts installed by the
> replaced package they may no longer exist or be the same?

PMS has similar wording for pkg_prerm and pkg_postrm, so (at least
according to the spec) the old package will still be present in
pkg_prerm and will be gone in pkg_postrm.

I don't think that the ebuild can rely on any particular status of the
new package in pkg_*rm (of the old package), or the status of the old
package in pkg_*inst (of the new package).

Ulrich
signature.asc (application/pgp-signature, 507 B)
-----BEGIN PGP SIGNATURE-----

iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmDTD5UPHHVsbUBnZW50
b28ub3JnAAoJEFGIM1CIQV4unZoIANMh5bxg4ztuL9/1YQy4ojjVlBeKarmoVkgK
kOWmSOi0PP+bYM7fz7f3ERUciEXSb19uf6ouVtweHSUtETOpqzrR3wMI8rlksjZy
Ki/MEl6ZeAkxe3BekS3VmPj38RCD9Pw2m0UxM/mtazbCzgPLw6E+Abb2Pel4rDbH
1+3bsfOdkgORwBHPUbGDMQAqsyxHm0PcKEAAqIIpWkv2k/dEScvz4/e/E/De4u1r
SUbxVvUGGQS51gdyZ+HwyIo0rAHcR3jqpa028CI0nsYAxoEMr5Z00NGZN1oozc6y
y226Xicn3WE79sVg6fCXIkhe8PQeirnFeGms+vlEI8/xNsTTU6o=
=Fs2o
-----END PGP SIGNATURE-----