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