summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-21 06:08:38 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-21 06:08:38 +0000
commit87b0ba879ab6eab04f70ffc9dadca329637f8d72 (patch)
tree90852aca2782a1b39b4a17b5e659eb76ed42d202
parenta8ac014ee7c32f58a82610892a4341fb3c4b8d8a (diff)
downloadportage-87b0ba879ab6eab04f70ffc9dadca329637f8d72.tar.gz
portage-87b0ba879ab6eab04f70ffc9dadca329637f8d72.tar.bz2
portage-87b0ba879ab6eab04f70ffc9dadca329637f8d72.zip
In dblink._preserve_libs(), strip leading $ROOT from contents paths so that
it works when $ROOT != /. svn path=/main/trunk/; revision=11155
-rw-r--r--pym/portage/dbapi/vartree.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index f9e3fc9ed..2127cae0a 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2107,8 +2107,10 @@ class dblink(object):
liblist = linkmap.listLibraryObjects()
# get list of libraries from old package instance
- old_contents = self._installed_instance.getcontents().keys()
- old_libs = set(old_contents).intersection(liblist)
+ root_len = len(self.myroot) - 1
+ old_contents = set(p[root_len:] \
+ for p in self._installed_instance.getcontents())
+ old_libs = old_contents.intersection(liblist)
# get list of libraries from new package instance
mylibs = set([os.path.join(os.sep, x) for x in mycontents]).intersection(liblist)