From 2b40f5dadd81ae84c6d1df2cf0930e2e5b5ec69f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 31 May 2007 21:39:50 +0000 Subject: Make automatic "global updates" always use the config instance that's associated with /, since the rest of the code is targeted at /. (trunk r6687) svn path=/main/branches/2.1.2/; revision=6703 --- bin/emerge | 4 ++-- bin/fixpackages | 2 +- pym/portage.py | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/emerge b/bin/emerge index 7023f02a8..d47203427 100755 --- a/bin/emerge +++ b/bin/emerge @@ -4225,7 +4225,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): if os.path.exists(myportdir+"/metadata/cache") and updatecache_flg: action_metadata(settings, portdb, myopts) - if portage.global_updates(settings, trees, mtimedb["updates"]): + if portage._global_updates(trees, mtimedb["updates"]): mtimedb.commit() # Reload the whole config from scratch. settings, trees, mtimedb = load_emerge_config(trees=trees) @@ -5261,7 +5261,7 @@ def emerge_main(): portage.writemsg("!!! %s\n" % str(e)) del e - if portage.global_updates(settings, trees, mtimedb["updates"]): + if portage._global_updates(trees, mtimedb["updates"]): mtimedb.commit() # Reload the whole config from scratch. settings, trees, mtimedb = load_emerge_config(trees=trees) diff --git a/bin/fixpackages b/bin/fixpackages index 388a9ad44..39b813662 100755 --- a/bin/fixpackages +++ b/bin/fixpackages @@ -24,7 +24,7 @@ except (OSError, ValueError), e: portage.writemsg("!!! %s\n" % str(e)) del e -portage.global_updates(mysettings, mytrees, mtimedb["updates"]) +portage._global_updates(mytrees, mtimedb["updates"]) print print "Done." diff --git a/pym/portage.py b/pym/portage.py index 16f105394..c08faf150 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -8123,12 +8123,10 @@ def portageexit(): atexit_register(portageexit) -def global_updates(mysettings, trees, prev_mtimes): +def _global_updates(trees, prev_mtimes): """ Perform new global updates if they exist in $PORTDIR/profiles/updates/. - @param mysettings: A config instance for ROOT="/". - @type mysettings: config @param trees: A dictionary containing portage trees. @type trees: dict @param prev_mtimes: A dictionary containing mtimes of files located in @@ -8142,6 +8140,7 @@ def global_updates(mysettings, trees, prev_mtimes): global secpass if secpass < 2 or "SANDBOX_ACTIVE" in os.environ: return + mysettings = trees["/"]["vartree"].settings updpath = os.path.join(mysettings["PORTDIR"], "profiles", "updates") try: -- cgit v1.2.3-1-g7c22