Remove a chdir() call that's no longer needed for the
authorZac Medico <zmedico@gentoo.org>
Sat, 13 Oct 2007 05:59:12 +0000 (05:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 13 Oct 2007 05:59:12 +0000 (05:59 -0000)
collision-protect symlink code.

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

pym/portage/dbapi/vartree.py

index dd982408b330b66bec6875aab8d8418e6bcd24ee..ded0943af9db2f6226fa357a6324e39b7e23630f 100644 (file)
@@ -1477,12 +1477,6 @@ class dblink(object):
        def _collision_protect(self, srcroot, destroot, mypkglist, mycontents, mysymlinks):
                        collision_ignore = set([normalize_path(myignore) for myignore in \
                                self.settings.get("COLLISION_IGNORE", "").split()])
-
-                       # the linkcheck only works if we are in srcroot
-                       mycwd = os.getcwd()
-                       os.chdir(srcroot)
-
-
                        mysymlinked_directories = [s + os.path.sep for s in mysymlinks]
                        del mysymlinks
 
@@ -1601,10 +1595,6 @@ class dblink(object):
                                        print "None of the installed packages claim the above file(s)."
                                        print
                                sys.exit(1)
-                       try:
-                               os.chdir(mycwd)
-                       except OSError:
-                               pass
                        return collisions
 
        def _security_check(self, installed_instances):