summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-30 18:45:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-30 18:45:49 +0000
commita9369fc520d328d98bd54407be7e3c673626af13 (patch)
tree60740736d47228ec7ac0d38194cdf07751ddd668
parentecdb8d3c8f063a0b7677ffa9e88250a1091ed339 (diff)
downloadportage-a9369fc520d328d98bd54407be7e3c673626af13.tar.gz
portage-a9369fc520d328d98bd54407be7e3c673626af13.tar.bz2
portage-a9369fc520d328d98bd54407be7e3c673626af13.zip
use strip(os.sep) on paths prior to os.path.join (branches/prefix
r9228) svn path=/main/trunk/; revision=9230
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 98f751f50..3ce61424a 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1599,7 +1599,7 @@ class dblink(object):
import shutil
for x in preserve_paths:
print "injecting %s into %s" % (x, srcroot)
- mydir = os.path.join(srcroot, os.path.dirname(x))
+ mydir = os.path.join(srcroot, os.path.dirname(x).lstrip(os.sep))
if not os.path.exists(mydir):
os.makedirs(mydir)
@@ -1613,7 +1613,8 @@ class dblink(object):
linktarget = os.path.join(os.path.dirname(x), linktarget)
preserve_paths.append(linktarget)
else:
- shutil.copy2(os.path.join(destroot, x), os.path.join(srcroot, x.lstrip(os.sep)))
+ shutil.copy2(os.path.join(destroot, x.lstrip(os.sep)),
+ os.path.join(srcroot, x.lstrip(os.sep)))
# keep track of the libs we preserved
self.vartree.dbapi.plib_registry.register(self.mycpv, self.settings["SLOT"], counter, preserve_paths)