From 8da0d7bed2770aad59881fec9aff2bb5548929a5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 31 Jul 2010 22:23:28 -0700 Subject: Move the mtimedb timestamps code out of an unnecessary loop. --- pym/portage/_global_updates.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pym/portage/_global_updates.py') 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 \ -- cgit v1.2.3-1-g7c22