From 0dc60ce69567f79f5d05148d80109cd7a6e93785 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Jan 2007 01:46:37 +0000 Subject: [PATCH] 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 --- bin/emerge | 3 ++- pym/portage.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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) -- 2.26.2