From: Zac Medico Date: Sun, 1 Aug 2010 05:23:28 +0000 (-0700) Subject: Move the mtimedb timestamps code out of an unnecessary loop. X-Git-Tag: v2.2_rc68~428 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8da0d7bed2770aad59881fec9aff2bb5548929a5;p=portage.git Move the mtimedb timestamps code out of an unnecessary loop. --- diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py index 7468417ac..d57b6e7ce 100644 --- a/pym/portage/_global_updates.py +++ b/pym/portage/_global_updates.py @@ -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 \