diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-09-28 17:09:24 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-09-28 17:09:24 +0000 |
commit | 703faeac4d2a7f6f3b9c0992e1f354c36c0da84e (patch) | |
tree | 239d30a7a4fde02efe2ab2557960a62108a88cb4 /pym | |
parent | 49eab10f97a139937483356c1e391dd12c1e6e1c (diff) | |
download | portage-703faeac4d2a7f6f3b9c0992e1f354c36c0da84e.tar.gz portage-703faeac4d2a7f6f3b9c0992e1f354c36c0da84e.tar.bz2 portage-703faeac4d2a7f6f3b9c0992e1f354c36c0da84e.zip |
Bug #194081 - Add EBUSY to the list of ignored errnos for unlink
and rmdir calls during unmerge. (trunk r7869)
svn path=/main/branches/2.1.2/; revision=7870
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py index c3c640182..66edec936 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7471,7 +7471,13 @@ class dblink: #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): @@ -7636,9 +7642,7 @@ class dblink: 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) |