Don't bother to list the contents of directories before they are unmerged since it...
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Jan 2007 04:54:56 +0000 (04:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Jan 2007 04:54:56 +0000 (04:54 -0000)
svn path=/main/trunk/; revision=5443

pym/portage.py

index 0fba8dfd4b932637dc2d5026bfd04f783b0a6546..685ba9568f85847765ac79c810ec4fc8ab4da82e 100644 (file)
@@ -6853,22 +6853,13 @@ class dblink:
 
                        mydirs.sort()
                        mydirs.reverse()
-                       last_non_empty = ""
 
                        for obj in mydirs:
-                               if not last_non_empty.startswith(obj) and not listdir(obj):
-                                       try:
-                                               os.rmdir(obj)
-                                               writemsg_stdout("<<<        %s %s\n" % ("dir",obj))
-                                               last_non_empty = ""
-                                               continue
-                                       except (OSError,IOError),e:
-                                               #immutable?
-                                               pass
-
-                               writemsg_stdout("--- !empty dir %s\n" % obj)
-                               last_non_empty = obj
-                               continue
+                               try:
+                                       os.rmdir(obj)
+                                       writemsg_stdout("<<<        %s %s\n" % ("dir",obj))
+                               except (OSError, IOError):
+                                       writemsg_stdout("--- !empty dir %s\n" % obj)
 
                #remove self from vartree database so that our own virtual gets zapped if we're the last node
                self.vartree.zap(self.mycpv)