When adding parent directories to contents inside
authorZac Medico <zmedico@gentoo.org>
Sun, 9 Nov 2008 17:19:55 +0000 (17:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 9 Nov 2008 17:19:55 +0000 (17:19 -0000)
dblink._add_preserve_libs_to_contents(), account for the trailing slash on
$ROOT in the while loop.

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

pym/portage/dbapi/vartree.py

index d2a123934b388647a417ed88e5ff9ee6083ecc9d..4186245982ed76dd3bc043c2117de97d4fa5392d 100644 (file)
@@ -2592,7 +2592,7 @@ class dblink(object):
                        showMessage(">>> needed    %s %s\n" % (obj_type, f_abs))
                        # Add parent directories to contents if necessary.
                        parent_dir = os.path.dirname(f_abs)
-                       while parent_dir != root:
+                       while len(parent_dir) > len(root):
                                new_contents[parent_dir] = ["dir"]
                                prev = parent_dir
                                parent_dir = os.path.dirname(parent_dir)