summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/emerge3
-rw-r--r--pym/portage/__init__.py9
2 files changed, 8 insertions, 4 deletions
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)