Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2021 17:28:57 +0100
From:      Stefan Esser <se@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        freebsd-pkg@FreeBSD.org, freebsd@ohreally.nl
Subject:   Re: Questions about /usr/local/lib/compat/pkg
Message-ID:  <624a7435-eaf3-03db-c47c-29783f45ede9@freebsd.org>
In-Reply-To: <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu>
References:  <15967907-03dc-a2ab-df86-6097d8d808f6@ohreally.nl> <20211108075438.jtqkak6n22n5rlg7@aniel.nours.eu> <9df3553b-b2c3-6b35-f06c-f123b981a613@ohreally.nl> <20211108095919.wfqj3kr2m6du5xsr@aniel.nours.eu> <9ea022cc-0886-6bfe-4f5c-993b2a683e3e@ohreally.nl> <4d28dae0-043f-dffd-ce79-644ee6e226e0@freebsd.org> <668211f6-e7db-8875-1c1e-214ed2d4388c@ohreally.nl> <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------p1C68ghgx0Pm7xNLcu9VLsJJ
Content-Type: multipart/mixed; boundary="------------c53r2AE0JnLEiU0dZtXmytr2";
 protected-headers="v1"
From: Stefan Esser <se@freebsd.org>
To: Baptiste Daroussin <bapt@FreeBSD.org>
Cc: freebsd-pkg@FreeBSD.org, freebsd@ohreally.nl
Message-ID: <624a7435-eaf3-03db-c47c-29783f45ede9@freebsd.org>
Subject: Re: Questions about /usr/local/lib/compat/pkg
References: <15967907-03dc-a2ab-df86-6097d8d808f6@ohreally.nl>
 <20211108075438.jtqkak6n22n5rlg7@aniel.nours.eu>
 <9df3553b-b2c3-6b35-f06c-f123b981a613@ohreally.nl>
 <20211108095919.wfqj3kr2m6du5xsr@aniel.nours.eu>
 <9ea022cc-0886-6bfe-4f5c-993b2a683e3e@ohreally.nl>
 <4d28dae0-043f-dffd-ce79-644ee6e226e0@freebsd.org>
 <668211f6-e7db-8875-1c1e-214ed2d4388c@ohreally.nl>
 <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu>
In-Reply-To: <20211108150652.5ckawymyfxdls4ys@aniel.nours.eu>

--------------c53r2AE0JnLEiU0dZtXmytr2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am 08.11.21 um 16:06 schrieb Baptiste Daroussin:
> On Mon, Nov 08, 2021 at 04:03:56PM +0100, freebsd@ohreally.nl wrote:
>> Thank you, Stefan.
>> I am creating an issue at the portupgrade/pkgtools GitHub project as w=
e
>> speak. I will include all the information that Baptiste and you have g=
iven
>> me.
>>
>> Best,
>>   Rob
>>
>=20
> Just the "No such file or directory @ rb_check_realpath_internal" shows=
 it comes
> from portupgrade and not pkg itself, I missed it in my first review.
>=20
> Note that portmaster and portupgrade do not need to support that featur=
e anymore
> as it is provided by pkg directly (they just need to activate it or not=
 if they
> wants for backward compatibility).
Hi Baptiste,

thank you for the information, I did not know about BACKUP_LIBRARIES.

But I think that the functionality is somewhat different. Portmaster
creates a copy of a local library before invoking "pkg delete" to keep
it around for any ports that still depend on it.

If a port is being upgraded and a library with the same name is
installed to /usr/local/lib, the backup in compat/pkg will be deleted.

AFAIUI, the effect of BACKUP_LIBRARIES, it has no effect on any command
besides "pkg add", and it specifically does not protect against the remov=
al
of a shared library that is still required by some installed package.
It does not appear to have any effect if "make install" is used to instal=
l
a port (since that only uses "pkg register", not "pkg add".)

The pkg command could check whether any of the libraries to be deleted
by "pkg delete" is still depended on by any other package (i.e. in the
list generated by "pkg query %B") and then copy it to compat/pkg, if
still being depended on.

OTOH if a new package is installed, any library in compat/pkg that is
in the list of newly installed libraries can be removed from compat/pkg.

This is important, since I found that "ldconfig -m" tends to add newly
created shared library locations to the end of the search path, and as
a result if a shared library has been saved to compat/pkg, it will take
precedence over a newly installed one. Therefore, removal of libraries
from compat/pkg is required in that case, to make the newly installed
libraries accessible.

Regards, STefan

PS: The documentation of BACKUP_LIBRARIES in pkg.conf(5) is not
very precise. And this parameter could be added to the list of
environment variables checked by "pkg add" in pkg-add(8).


--------------c53r2AE0JnLEiU0dZtXmytr2--

--------------p1C68ghgx0Pm7xNLcu9VLsJJ
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmGJUEkFAwAAAAAACgkQR+u171r99URw
uAgAvlh7K1RqxWuGeUUxQVS70W4vhvhhgFUCZXNFAcwIijrRTulALobu47w7aCzxXWAqo750ZrXz
8GQzwTjf/6p14azdUN0kvx98280CiDZg7qDFfGovGhW70N19EbpZh/jpySb7cupMbQltgVz2G6dS
m1+M1C3hGVLcoS4wUv3kt/k/Z3tR5KzB6Vf8QK6wBh+KQGP1CL84B0RG3/rLm+7doY4MNGDRHdFH
z9slQ9j3VgzALCdjBOHL9scQEp/NWYPsCcfLIlXz0hV27NX4AHZcnsREKato7LcEdnfHqyRSq8bY
wZZpwOMsCwMGH15AyVT5W5VBEG0tW+0xqNvzYmvt1Q==
=sd8A
-----END PGP SIGNATURE-----

--------------p1C68ghgx0Pm7xNLcu9VLsJJ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?624a7435-eaf3-03db-c47c-29783f45ede9>