List Archive: gentoo-soc
On Thu, Aug 21, 2008 at 10:47 AM, Donnie Berkholz <dberkholz@g.o> wrote:
> I just encountered a problem recently and wondered whether your work
> might help it at all. The situation is uninstalling a library that
> system packages link against. The problem I hit involves
> sys-apps/shadow[USE=audit] and sys-process/audit, which I just hit on my
> own system, breaking /bin/login.
>
> It seems like this could become part of the linkage map and thus give
> the user a warning, if it's not already -- I haven't been following this
> incredibly closely.
>
> What do you think?
In situations where a package is updated resulting in a new ABI for a
library (eg suppose libaudit.so.0 were updated to libaudit.so.1 in a
newer version of sys-process/audit), preserved libs would keep the old
libraries around by adding them to the CONTENTS of the newer package
so that libaudit.so.0 is still available for binaries that link to it.
This is done by finding consumers (linked binaries) of files
(libraries) that are being unmerged via calling
LinkageMap.findConsumers on files to be unmerged. However, in the
situation you provided, the package is removed, so (and I'm assuming
here) the only problem is deciding what to do with those needed
libraries. Since sys-process/audit is being removed, there is no good
candidate package that would own the files necessary to preserve the
libraries, but throwing a warning to the user is certainly feasible
using a similar method to find preserved libraries.
As for using MissingLibraryConsumerSet in this situation, it'd
probably be too slow to calculate the set after each unmerge since the
set checks dependencies of the entire system. To give you an idea, on
my older laptop it takes about 20-30 seconds to calculate the set (and
more like 10s on subsequent runs due to vfs caching inodes and such).
So it'd be much quicker to simply find consumers of files to be
unmerged and give a warning if any are found as this won't involve
nearly as much filesystem access.
Now in the situation where needed libraries have already been
uninstalled and binaries are broken, MissingLibraryConsumerSet can be
used to emerge packages necessary to fix the state of the system... if
you can login, that is :)
Lucian
|
|