summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-24 20:28:57 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-24 20:28:57 +0000
commit97b3e8be9b5b63c4476c6a76c3aecb8bf9e20725 (patch)
treebb373abd68e52c3e72ec27902e05f81c649da9fc /pym
parent4911690cfc977ff22da143dd9af987be400a2dec (diff)
downloadportage-97b3e8be9b5b63c4476c6a76c3aecb8bf9e20725.tar.gz
portage-97b3e8be9b5b63c4476c6a76c3aecb8bf9e20725.tar.bz2
portage-97b3e8be9b5b63c4476c6a76c3aecb8bf9e20725.zip
Fix preserve-libs code inside dblink.unmerge() so that it will join paths
correctly when ROOT != /. svn path=/main/trunk/; revision=11724
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/vartree.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index fb5b28e33..141585fe0 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1935,6 +1935,8 @@ class dblink(object):
# their real target before the object is found not to be
# in the reverse NEEDED map
def symlink_compare(x, y):
+ x = os.path.join(self.myroot, x.lstrip(os.path.sep))
+ y = os.path.join(self.myroot, y.lstrip(os.path.sep))
if os.path.islink(x):
if os.path.islink(y):
return 0
@@ -1947,20 +1949,23 @@ class dblink(object):
plib_dict[cpv].sort(symlink_compare)
for f in plib_dict[cpv]:
- if not os.path.exists(f):
+ f_abs = os.path.join(self.myroot, f.lstrip(os.path.sep))
+ if not os.path.exists(f_abs):
continue
unlink_list = []
consumers = self.vartree.dbapi.linkmap.findConsumers(f)
if not consumers:
- unlink_list.append(f)
+ unlink_list.append(f_abs)
else:
keep=False
for c in consumers:
+ c = os.path.join(self.myroot,
+ c.lstrip(os.path.sep))
if c not in self.getcontents():
keep=True
break
if not keep:
- unlink_list.append(f)
+ unlink_list.append(f_abs)
for obj in unlink_list:
try:
if os.path.islink(obj):