From: Zac Medico Date: Tue, 14 Nov 2006 14:42:52 +0000 (-0000) Subject: Only reload the config if global updates have actually been performed. X-Git-Tag: v2.1.2~463 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d4c5158b8fd39fc1cdcba21e392d011a32a9d63b;p=portage.git Only reload the config if global updates have actually been performed. svn path=/main/trunk/; revision=5049 --- diff --git a/bin/emerge b/bin/emerge index 7cd5b58ef..f2c523dd1 100755 --- a/bin/emerge +++ b/bin/emerge @@ -3487,12 +3487,11 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): if os.path.exists(myportdir+"/metadata/cache") and updatecache_flg: action_metadata(settings, portdb, myopts) - portage.global_updates( - settings, trees, mtimedb["updates"]) - mtimedb.commit() - # Reload the whole config from scratch. - settings, trees, mtimedb = load_emerge_config(trees=trees) - portdb = trees[settings["ROOT"]]["porttree"].dbapi + if portage.global_updates(settings, trees, mtimedb["updates"]): + mtimedb.commit() + # Reload the whole config from scratch. + settings, trees, mtimedb = load_emerge_config(trees=trees) + portdb = trees[settings["ROOT"]]["porttree"].dbapi mybestpv = portdb.xmatch("bestmatch-visible", "sys-apps/portage") mypvs = portage.best( @@ -4391,11 +4390,11 @@ def emerge_main(): os.umask(022) settings, trees, mtimedb = load_emerge_config() portdb = trees[settings["ROOT"]]["porttree"].dbapi - portage.global_updates(settings, trees, mtimedb["updates"]) - mtimedb.commit() - # Reload the whole config from scratch. - settings, trees, mtimedb = load_emerge_config(trees=trees) - portdb = trees[settings["ROOT"]]["porttree"].dbapi + if portage.global_updates(settings, trees, mtimedb["updates"]): + mtimedb.commit() + # Reload the whole config from scratch. + settings, trees, mtimedb = load_emerge_config(trees=trees) + portdb = trees[settings["ROOT"]]["porttree"].dbapi ldpath_mtimes = mtimedb["ldpath"] xterm_titles = "notitles" not in settings.features