Gentoo Archives: gentoo-dev

From: Maciej Mrozowski <reavertm@×××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] More reliable hiding preserved libraries
Date: Sat, 03 Apr 2010 10:38:42
1 Problem
3 known, let me summarize briefly.
5 Uninstalling packages providing libraries, without checking reverse runtime
6 dependencies of those packages leaves their dependencies unsatisfied (packages
7 with broken executables and/or shared libs).
8 Some package managers try their best not to remove said libraries, yet
9 allowing packages to be removed.
10 Those orphaned libraries cause problems[1] as build systems of some other
11 packages being (re)installed afterwards pick them up and abuse those orphaned
12 libraries. (we don't like orphans abused, we prefer them... "gone").
14 Solution
16 Now, I suppose there are some ideas how to make orphaned libraries not go in a
17 way. Basically then need to be available for system, but hidden for "emerge".
19 There is opt-out suggestion[2], unfortunately it does not provide any info how
20 exactly it's supposed to be achieved. As far as portage/pkgcore is concerned,
21 maybe - as Brian Harring suggested - sandbox could be used to somehow "hide"
22 preserved libraries or preserved library directory from ebuild environment
23 (preserved library directory a'ka "purgatory" - libs could be moved there when
24 considered orphaned).
26 Opt-in suggestion is as follows:
27 1. Use some library path (read by ld loader from environment) and export it
28 globally to environment pointing it to preserved library directory.
29 2. During "emerge", unset environment variable corresponding to said preserved
30 library directory - orphans are no longer located.
31 Attached patch for glibc (2.11, but should apply to any other glibc around)
32 and uClibc (this one is not tested but should work as well) that makes ld
33 loader aware of LD_GENTOO_PRESERVED_LIBRARY_PATH variable.
35 (LD_LIBRARY_PATH would work as well, but it's being used widely so cannot be
36 safely mangled.. on the second though it can - one could filter out preserved
37 library paths from it during "emerge").
39 Thoughts?
41 1.
42 2.
44 --
45 regards
46 MM


File name MIME type
glibc-2.11_ld-gentoo-preserved-library-path.patch text/x-patch
uClibc- text/x-patch