Bug #192321 - Clean dir.old cruft so that they don't prevent unmerge
authorZac Medico <zmedico@gentoo.org>
Wed, 26 Sep 2007 04:06:08 +0000 (04:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 26 Sep 2007 04:06:08 +0000 (04:06 -0000)
of otherwise empty directories. (trunk r7774)

svn path=/main/branches/2.1.2/; revision=7814

bin/emerge

index d7c88474346a04374a158d6a0e06e2f4b8ba1889..f3d6d95f1da95729bf0e7384b30276453bfdc314 100755 (executable)
@@ -4413,6 +4413,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)