summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-14 14:42:52 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-14 14:42:52 +0000
commitd4c5158b8fd39fc1cdcba21e392d011a32a9d63b (patch)
treee7a21872b5a3d00f602d1ca1e6bd97d04cb07928
parent2923813044268dc668bb867e650c89616c726b4c (diff)
downloadportage-d4c5158b8fd39fc1cdcba21e392d011a32a9d63b.tar.gz
portage-d4c5158b8fd39fc1cdcba21e392d011a32a9d63b.tar.bz2
portage-d4c5158b8fd39fc1cdcba21e392d011a32a9d63b.zip
Only reload the config if global updates have actually been performed.
svn path=/main/trunk/; revision=5049
-rwxr-xr-xbin/emerge21
1 files changed, 10 insertions, 11 deletions
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