Gentoo Archives: gentoo-soc

From: Lucian Poston <lucianposton@×××××.com>
To: gentoo-soc@l.g.o
Cc: Marius Mauch <google-soc@××××××.de>
Subject: Re: [gentoo-soc] Progress Report - Revdep-rebuild
Date: Thu, 21 Aug 2008 18:09:28
Message-Id: c4cdc1420808211109o77bc6d1dsa32f4ae63aabf3be@mail.gmail.com
In Reply to: Re: [gentoo-soc] Progress Report - Revdep-rebuild by Donnie Berkholz
1 On Thu, Aug 21, 2008 at 10:47 AM, Donnie Berkholz <dberkholz@g.o> wrote:
2 > I just encountered a problem recently and wondered whether your work
3 > might help it at all. The situation is uninstalling a library that
4 > system packages link against. The problem I hit involves
5 > sys-apps/shadow[USE=audit] and sys-process/audit, which I just hit on my
6 > own system, breaking /bin/login.
7 >
8 > It seems like this could become part of the linkage map and thus give
9 > the user a warning, if it's not already -- I haven't been following this
10 > incredibly closely.
11 >
12 > What do you think?
13
14 In situations where a package is updated resulting in a new ABI for a
15 library (eg suppose libaudit.so.0 were updated to libaudit.so.1 in a
16 newer version of sys-process/audit), preserved libs would keep the old
17 libraries around by adding them to the CONTENTS of the newer package
18 so that libaudit.so.0 is still available for binaries that link to it.
19 This is done by finding consumers (linked binaries) of files
20 (libraries) that are being unmerged via calling
21 LinkageMap.findConsumers on files to be unmerged. However, in the
22 situation you provided, the package is removed, so (and I'm assuming
23 here) the only problem is deciding what to do with those needed
24 libraries. Since sys-process/audit is being removed, there is no good
25 candidate package that would own the files necessary to preserve the
26 libraries, but throwing a warning to the user is certainly feasible
27 using a similar method to find preserved libraries.
28
29 As for using MissingLibraryConsumerSet in this situation, it'd
30 probably be too slow to calculate the set after each unmerge since the
31 set checks dependencies of the entire system. To give you an idea, on
32 my older laptop it takes about 20-30 seconds to calculate the set (and
33 more like 10s on subsequent runs due to vfs caching inodes and such).
34 So it'd be much quicker to simply find consumers of files to be
35 unmerged and give a warning if any are found as this won't involve
36 nearly as much filesystem access.
37
38 Now in the situation where needed libraries have already been
39 uninstalled and binaries are broken, MissingLibraryConsumerSet can be
40 used to emerge packages necessary to fix the state of the system... if
41 you can login, that is :)
42
43 Lucian