diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-31 22:23:28 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-31 22:23:28 -0700 |
commit | 8da0d7bed2770aad59881fec9aff2bb5548929a5 (patch) | |
tree | e4ff187192f0cf1884276ef0621d5e35d7211c1c | |
parent | f5e48098ddd114c2448ff0071f4267b3bc4ee880 (diff) | |
download | portage-8da0d7bed2770aad59881fec9aff2bb5548929a5.tar.gz portage-8da0d7bed2770aad59881fec9aff2bb5548929a5.tar.bz2 portage-8da0d7bed2770aad59881fec9aff2bb5548929a5.zip |
Move the mtimedb timestamps code out of an unnecessary loop.
-rw-r--r-- | pym/portage/_global_updates.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 \ |