summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-28 17:07:37 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-28 17:07:37 +0000
commite712d878ba0921bfd7090aced860bc315c264ceb (patch)
tree75eadb78a4a8ecfd5dea21d373ad5fe517a1553f
parent47ba1ce06b258104c4a86f10b17c1089548c3595 (diff)
downloadportage-e712d878ba0921bfd7090aced860bc315c264ceb.tar.gz
portage-e712d878ba0921bfd7090aced860bc315c264ceb.tar.bz2
portage-e712d878ba0921bfd7090aced860bc315c264ceb.zip
Bug #194081 - Add EBUSY to the list of ignored errnos for unlink
and rmdir calls during unmerge. svn path=/main/trunk/; revision=7869
-rw-r--r--pym/portage/dbapi/vartree.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index f3b806ea5..9cde9624f 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1184,7 +1184,13 @@ class dblink(object):
#process symlinks second-to-last, directories last.
mydirs = []
- ignored_unlink_errnos = (errno.ENOENT, errno.ENOTDIR, errno.EISDIR)
+ ignored_unlink_errnos = (
+ errno.EBUSY, errno.ENOENT,
+ errno.ENOTDIR, errno.EISDIR)
+ ignored_rmdir_errnos = (
+ errno.EEXIST, errno.ENOTEMPTY,
+ errno.EBUSY, errno.ENOENT,
+ errno.ENOTDIR, errno.EISDIR)
modprotect = os.path.join(self.vartree.root, "lib/modules/")
def unlink(file_name, lstatobj):
@@ -1349,9 +1355,7 @@ class dblink(object):
bsd_chflags.chflags(parent_name, pflags)
show_unmerge("<<<", "", "dir", obj)
except EnvironmentError, e:
- if e.errno not in (errno.ENOENT,
- errno.EEXIST, errno.ENOTEMPTY,
- errno.ENOTDIR):
+ if e.errno not in ignored_rmdir_errnos:
raise
if e.errno != errno.ENOENT:
show_unmerge("---", "!empty", "dir", obj)