From 591d4a65713a5a5c38b1e536a8524f9474a35aa5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 28 Oct 2008 09:25:56 +0000 Subject: [PATCH] Fix some incorrect $ROOT handling inside LinkageMap. svn path=/main/trunk/; revision=11733 --- pym/portage/dbapi/vartree.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 04cb7de25..a62c0520a 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -244,7 +244,8 @@ class LinkageMap(object): obj = fields[1] obj_key = self._ObjectKey(obj, root) soname = fields[2] - path = set([normalize_path(x) + path = set([ + normalize_path(os.path.join(self._root, x.lstrip(os.path.sep))) for x in filter(None, fields[3].replace( "${ORIGIN}", os.path.dirname(obj)).replace( "$ORIGIN", os.path.dirname(obj)).split(":"))]) @@ -519,7 +520,8 @@ class LinkageMap(object): for provider_key in self._libs[soname][arch]["providers"]: providers = self._obj_properties[provider_key][4] for provider in providers: - if os.path.dirname(provider) in path: + if os.path.join(self._root, + os.path.dirname(provider).lstrip(os.path.sep)) in path: rValue[soname].add(provider) return rValue @@ -571,8 +573,8 @@ class LinkageMap(object): # have any consumers. if not isinstance(obj, self._ObjectKey): soname = self._obj_properties[obj_key][3] - obj_dir = os.path.dirname(obj) - master_link = os.path.join(obj_dir, soname) + master_link = os.path.join(self._root, + os.path.dirname(obj).lstrip(os.path.sep), soname) try: master_st = os.stat(master_link) obj_st = os.stat(obj) -- 2.26.2