From: Zac Medico Date: Mon, 29 Jan 2007 01:46:37 +0000 (-0000) Subject: Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead... X-Git-Tag: v2.1.2-r5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0dc60ce69567f79f5d05148d80109cd7a6e93785;p=portage.git Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead of ENOTEMPTY. (trunk r5798) svn path=/main/branches/2.1.2/; revision=5830 --- diff --git a/bin/emerge b/bin/emerge index 1302818a7..a3561aee7 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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) diff --git a/pym/portage.py b/pym/portage.py index 8b97cc5b5..b7ba73f37 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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)