Re: postinstall removed yet another "obsolete" system library that was still used....

2020-06-30 Thread David Brownlee
On Sun, 28 Jun 2020 at 21:21, Christos Zoulas  wrote:
>
> In article ,
> Greg A. Woods  wrote:
> >-=-=-=-=-=-
> >
> >So I just upgraded a system from an old 8.99 -current to a newer 9.99
> >current and "postinstall fix obsolete" removed my /usr/lib/libgomp.so.1*
> >
> >However this library was still in use by installed packages (due, I
> >think, to a dependency of libgd on libgomp, thus every gd-using package
> >is now G.D. broke)!
> >
> >I propose that the rule documented in src/distrib/lists/base/shl.mi be
> >far more strictly observed, even for libraries that appear and disappear
> >between releases (i.e. for -current), at least for the ".major" link and
> >the file it points to.  If they were never there in a release, never
> >mentioning them as obsolete in releases should be just fine (i.e. they
> >were never there, so never mentioning them is the correct thing to do).
> >
> >On the other hand we could first fix postinstall to be more careful by
> >getting it to fetch all the "REQUIRED" values from package BUILD_INFO
> >like this:
> >
> >   pkg_info -a -Q REQUIRES  | sort -u
> >
> >and then have it noisily refuse to remove any obsolete file still in
> >this "required" list.  This would allow us to mention all old/upgraded
> >shared libraries as obsolete, including those from between releases.  Of
> >course this only protects things installed via pkgsrc, and there's still
> >the risk of subsequently needing to install a binary package built for
> >an older release which needs one of these "obsolete" files, but at least
> >pkg_add can (be made to if it doesn't already) notice this and abort.
>
> That is a good idea. Perhaps even
>
> pkg_info -a -Q REQUIRES  | fgrep -v /usr/pkg | sort -u

Another possible (orthogonal) option - have postinstall fix default to
moving obsolete files into a directory tree under a temp directory, so
if you need to get anything back its still on the disk.

David


Re: postinstall removed yet another "obsolete" system library that was still used....

2020-06-28 Thread Christos Zoulas
In article ,
Greg A. Woods  wrote:
>-=-=-=-=-=-
>
>So I just upgraded a system from an old 8.99 -current to a newer 9.99
>current and "postinstall fix obsolete" removed my /usr/lib/libgomp.so.1*
>
>However this library was still in use by installed packages (due, I
>think, to a dependency of libgd on libgomp, thus every gd-using package
>is now G.D. broke)!
>
>I propose that the rule documented in src/distrib/lists/base/shl.mi be
>far more strictly observed, even for libraries that appear and disappear
>between releases (i.e. for -current), at least for the ".major" link and
>the file it points to.  If they were never there in a release, never
>mentioning them as obsolete in releases should be just fine (i.e. they
>were never there, so never mentioning them is the correct thing to do).
>
>On the other hand we could first fix postinstall to be more careful by
>getting it to fetch all the "REQUIRED" values from package BUILD_INFO
>like this:
>
>   pkg_info -a -Q REQUIRES  | sort -u
>
>and then have it noisily refuse to remove any obsolete file still in
>this "required" list.  This would allow us to mention all old/upgraded
>shared libraries as obsolete, including those from between releases.  Of
>course this only protects things installed via pkgsrc, and there's still
>the risk of subsequently needing to install a binary package built for
>an older release which needs one of these "obsolete" files, but at least
>pkg_add can (be made to if it doesn't already) notice this and abort.

That is a good idea. Perhaps even

pkg_info -a -Q REQUIRES  | fgrep -v /usr/pkg | sort -u

christos



postinstall removed yet another "obsolete" system library that was still used....

2020-06-27 Thread Greg A. Woods
So I just upgraded a system from an old 8.99 -current to a newer 9.99
current and "postinstall fix obsolete" removed my /usr/lib/libgomp.so.1*

However this library was still in use by installed packages (due, I
think, to a dependency of libgd on libgomp, thus every gd-using package
is now G.D. broke)!

I propose that the rule documented in src/distrib/lists/base/shl.mi be
far more strictly observed, even for libraries that appear and disappear
between releases (i.e. for -current), at least for the ".major" link and
the file it points to.  If they were never there in a release, never
mentioning them as obsolete in releases should be just fine (i.e. they
were never there, so never mentioning them is the correct thing to do).

On the other hand we could first fix postinstall to be more careful by
getting it to fetch all the "REQUIRED" values from package BUILD_INFO
like this:

pkg_info -a -Q REQUIRES  | sort -u

and then have it noisily refuse to remove any obsolete file still in
this "required" list.  This would allow us to mention all old/upgraded
shared libraries as obsolete, including those from between releases.  Of
course this only protects things installed via pkgsrc, and there's still
the risk of subsequently needing to install a binary package built for
an older release which needs one of these "obsolete" files, but at least
pkg_add can (be made to if it doesn't already) notice this and abort.

--
Greg A. Woods 

Kelowna, BC +1 250 762-7675   RoboHack 
Planix, Inc.  Avoncote Farms 


pgpH1wJr2kVDc.pgp
Description: OpenPGP Digital Signature