Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead... v2.1.2-r5
authorZac Medico <zmedico@gentoo.org>
Mon, 29 Jan 2007 01:46:37 +0000 (01:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 29 Jan 2007 01:46:37 +0000 (01:46 -0000)
svn path=/main/branches/2.1.2/; revision=5830

bin/emerge
pym/portage.py

index 1302818a767db18af8872e21bab5e6f45653cb8e..a3561aee71de236160cf72fc6393b7fe1df551e7 100755 (executable)
@@ -2992,7 +2992,8 @@ class MergeTask(object):
                                                        try:
                                                                os.rmdir(catdir)
                                                        except OSError, e:
-                                                               if e.errno != errno.ENOTEMPTY:
+                                                               if e.errno not in (errno.ENOENT,
+                                                                       errno.ENOTEMPTY, errno.EEXIST):
                                                                        raise
                                                                del e
                                                        portage_locks.unlockdir(catdir_lock)
index 8b97cc5b508bd83d0eb249f12610356f27a32680..b7ba73f37274b6135099c671ff24adb36e8af353 100644 (file)
@@ -6284,7 +6284,8 @@ class binarytree(object):
                try:
                        os.rmdir(os.path.join(self.pkgdir, mycat))
                except OSError, e:
-                       if e.errno not in (errno.ENOENT, errno.ENOTEMPTY):
+                       if e.errno not in (errno.ENOENT,
+                               errno.ENOTEMPTY, errno.EEXIST):
                                raise
                        del e
 
@@ -6896,7 +6897,8 @@ class dblink:
                                        try:
                                                os.rmdir(catdir)
                                        except OSError, e:
-                                               if e.errno != errno.ENOTEMPTY:
+                                               if e.errno not in (errno.ENOENT,
+                                                       errno.ENOTEMPTY, errno.EEXIST):
                                                        raise
                                                del e
                                        portage_locks.unlockdir(catdir_lock)
@@ -7901,7 +7903,8 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None, vartree=None, prev_mtimes
                                        try:
                                                os.rmdir(catdir)
                                        except OSError, e:
-                                               if e.errno != errno.ENOTEMPTY:
+                                               if e.errno not in (errno.ENOENT,
+                                                       errno.ENOTEMPTY, errno.EEXIST):
                                                        raise
                                                del e
                                        portage_locks.unlockdir(catdir_lock)