Move the mtimedb timestamps code out of an unnecessary loop.
authorZac Medico <zmedico@gentoo.org>
Sun, 1 Aug 2010 05:23:28 +0000 (22:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 1 Aug 2010 05:23:28 +0000 (22:23 -0700)
pym/portage/_global_updates.py

index 7468417ac62df47e5a047be2df1f616f817617f8..d57b6e7cea646e0549f7a07f93eb6726202dd65a 100644 (file)
@@ -166,9 +166,11 @@ def _global_updates(trees, prev_mtimes):
                                                if moves:
                                                        writemsg_stdout(moves * "S")
 
+       if retupd:
+
                        # The above global updates proceed quickly, so they
                        # are considered a single mtimedb transaction.
-                       if len(timestamps) > 0:
+                       if timestamps:
                                # We do not update the mtime in the mtimedb
                                # until after _all_ of the above updates have
                                # been processed because the mtimedb will
@@ -176,7 +178,6 @@ def _global_updates(trees, prev_mtimes):
                                for mykey, mtime in timestamps.items():
                                        prev_mtimes[mykey] = mtime
 
-       if retupd:
                        do_upgrade_packagesmessage = False
                        # We gotta do the brute force updates for these now.
                        if mysettings.get("PORTAGE_CALLER") == "fixpackages" or \