From: Zac Medico Date: Sat, 27 Jan 2007 22:58:49 +0000 (-0000) Subject: Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead... X-Git-Tag: v2.2_pre1~1795 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4c783e524aeab68f5a1f19d9559021831c40e3f4;p=portage.git Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead of ENOTEMPTY. svn path=/main/trunk/; revision=5798 --- diff --git a/bin/emerge b/bin/emerge index e4100b73b..119705691 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ee911fc7e..f58af8411 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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)