diff options
author | Marius Mauch <genone@gentoo.org> | 2008-05-02 09:28:37 +0000 |
---|---|---|
committer | Marius Mauch <genone@gentoo.org> | 2008-05-02 09:28:37 +0000 |
commit | 2102f181096aad44bb6bee720527c05da097e735 (patch) | |
tree | 54e287b5549d2448e1c39e0eabe7a2ed5b1bae32 | |
parent | ef550d831d6dd71db73a7b3a9429af461ba4bb98 (diff) | |
download | portage-2102f181096aad44bb6bee720527c05da097e735.tar.gz portage-2102f181096aad44bb6bee720527c05da097e735.tar.bz2 portage-2102f181096aad44bb6bee720527c05da097e735.zip |
use special symlink comparison code (original patch from prefix r9499)
svn path=/main/trunk/; revision=10082
-rw-r--r-- | pym/portage/dbapi/vartree.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 63a8ef9ba..ded583cd1 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -158,7 +158,7 @@ class LinkageMap(object): # insufficient field length continue arch = fields[0] - obj = fields[1] + obj = os.path.realpath(fields[1]) soname = fields[2] path = fields[3].replace("${ORIGIN}", os.path.dirname(obj)).replace("$ORIGIN", os.path.dirname(obj)).split(":") needed = fields[4].split(",") @@ -1288,6 +1288,23 @@ class dblink(object): plib_dict = plib_registry.getPreservedLibs() for cpv in plib_dict: plib_dict[cpv].sort() + # for the loop below to work correctly, we need all + # symlinks to come before the actual files, such that + # the recorded symlinks (sonames) will be resolved into + # their real target before the object is found not to be + # in the reverse NEEDED map + def symlink_compare(x, y): + if os.path.islink(x): + if os.path.islink(y): + return 0 + else: + return -1 + elif os.path.islink(y): + return 1 + else: + return 0 + + plib_dict[cpv].sort(symlink_compare) for f in plib_dict[cpv]: if not os.path.exists(f): continue |