In dblink.isowner(), correct the logic to test the path itself (via lstat) rather...
authorZac Medico <zmedico@gentoo.org>
Sat, 9 Sep 2006 22:00:57 +0000 (22:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 9 Sep 2006 22:00:57 +0000 (22:00 -0000)
svn path=/main/trunk/; revision=4430

pym/portage.py

index fa2ac9cdbdd35291336e690479aaff475a1fdf0c..a39e16ee4103e5029dbcb7fbd651c27386afbb03 100644 (file)
@@ -5855,8 +5855,11 @@ class dblink:
                (for this or a previous version)"""
                destfile = normalize_path(
                        os.path.join(destroot, filename.lstrip(os.path.sep)))
-               if not os.path.exists(destfile):
+               try:
+                       os.lstat(destfile) # lexists requires >=python-2.4
+               except OSError:
                        return True
+
                pkgfiles = self.getcontents()
                if pkgfiles and filename in pkgfiles:
                        return True