1 |
commit: b9fc8e55f96c17aeece87387226ada1b184d2f77 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 2 09:09:34 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 2 23:02:39 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b9fc8e55 |
7 |
|
8 |
PreservedLibsRegistry: fix pruneNonExisting for symlinks to other dirs (bug 642672) |
9 |
|
10 |
Fix pruneNonExisting to use the abssymlink function to detect symlinks |
11 |
in the registry that no longer point to a preserved library. The previous |
12 |
code only worked correctly for symlinks pointing to files in the same |
13 |
directory, which failed for packages like dev-ada/xmlada which have |
14 |
symlinks that point into a subdirectory. |
15 |
|
16 |
Fixes: 32d19be14e22 ("pruneNonExisting: handle eselect-opengl symlinks") |
17 |
Tested-by: Tupone Alfredo <tupone <AT> gentoo.org> |
18 |
Bug: https://bugs.gentoo.org/642672 |
19 |
|
20 |
pym/portage/util/_dyn_libs/PreservedLibsRegistry.py | 3 ++- |
21 |
1 file changed, 2 insertions(+), 1 deletion(-) |
22 |
|
23 |
diff --git a/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py b/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py |
24 |
index a422ffefd..f83b82a31 100644 |
25 |
--- a/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py |
26 |
+++ b/pym/portage/util/_dyn_libs/PreservedLibsRegistry.py |
27 |
@@ -12,6 +12,7 @@ try: |
28 |
except ImportError: |
29 |
import pickle |
30 |
|
31 |
+from portage import abssymlink |
32 |
from portage import os |
33 |
from portage import _encodings |
34 |
from portage import _os_merge |
35 |
@@ -227,7 +228,7 @@ class PreservedLibsRegistry(object): |
36 |
# removed by _remove_preserved_libs, it calls pruneNonExisting |
37 |
# which eliminates the irrelevant symlink from the registry here. |
38 |
for f, target in symlinks.items(): |
39 |
- if os.path.join(os.path.dirname(f), target) in hardlinks: |
40 |
+ if abssymlink(f, target=target) in hardlinks: |
41 |
paths.append(f) |
42 |
|
43 |
if len(paths) > 0: |