1 |
Problem |
2 |
|
3 |
..is known, let me summarize briefly. |
4 |
|
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"). |
13 |
|
14 |
Solution |
15 |
|
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". |
18 |
|
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). |
25 |
|
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. |
34 |
|
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"). |
38 |
|
39 |
Thoughts? |
40 |
|
41 |
1. https://bugs.gentoo.org/show_bug.cgi?id=240323 |
42 |
2. https://bugs.gentoo.org/show_bug.cgi?id=307391 |
43 |
|
44 |
-- |
45 |
regards |
46 |
MM |