summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-13 16:48:05 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-13 16:48:05 +0000
commit2f8fc3254802f15f4231ed9cf5e522b57f07a16a (patch)
tree72de3eb1c87e6c14df34fd25aedb0b78dc161f3e
parent3da460585e953d0b0c08732de02ce0bffef8a97c (diff)
downloadportage-2f8fc3254802f15f4231ed9cf5e522b57f07a16a.tar.gz
portage-2f8fc3254802f15f4231ed9cf5e522b57f07a16a.tar.bz2
portage-2f8fc3254802f15f4231ed9cf5e522b57f07a16a.zip
Bug #192321 - Clean dir.old cruft so that they don't prevent unmerge of
otherwise empty directories. svn path=/main/trunk/; revision=7774
-rw-r--r--pym/emerge/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index d27eb8686..b09e20537 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -4366,6 +4366,16 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
raise
del e
+ # Clean dir.old cruft so that they don't prevent
+ # unmerge of otherwise empty directories.
+ for ext in dir_extensions:
+ try:
+ os.unlink(dir_file + ext + ".old")
+ except EnvironmentError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
+
#update mtime so we can potentially avoid regenerating.
prev_mtimes[inforoot] = long(os.stat(inforoot).st_mtime)