Fix isprotected() call in dblink._collision_protect() to properly account
authorZac Medico <zmedico@gentoo.org>
Fri, 22 Aug 2008 23:30:13 +0000 (23:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 22 Aug 2008 23:30:13 +0000 (23:30 -0000)
for $ROOT.

svn path=/main/trunk/; revision=11452

pym/portage/dbapi/vartree.py

index b8b37236c65a980e83b80edb23df7a16d0c2c13c..3671190d2c75ca5299b0723f9d3cc9ea2f00762a 100644 (file)
@@ -2592,8 +2592,9 @@ class dblink(object):
                                if f[0] != "/":
                                        f="/"+f
                                isowned = False
+                               full_path = os.path.join(destroot, f.lstrip(os.path.sep))
                                for ver in [self] + mypkglist:
-                                       if (ver.isowner(f, destroot) or ver.isprotected(f)):
+                                       if (ver.isowner(f, destroot) or ver.isprotected(full_path)):
                                                isowned = True
                                                break
                                if not isowned: