Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead...
authorZac Medico <zmedico@gentoo.org>
Sat, 27 Jan 2007 22:58:49 +0000 (22:58 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 27 Jan 2007 22:58:49 +0000 (22:58 -0000)
svn path=/main/trunk/; revision=5798

bin/emerge
pym/portage/__init__.py

index e4100b73b0d85b0e8463777f9586cd938fa7129e..119705691c0fdbff720dec90e653f68cfc71a9bd 100755 (executable)
@@ -2993,7 +2993,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 ee911fc7eb3f21d071053772f77e1451f123fa7f..f58af8411cc992b9176e2721432703e2c6df2e8c 100644 (file)
@@ -6349,7 +6349,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
 
@@ -6961,7 +6962,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)
@@ -7966,7 +7968,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)