diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-31 05:43:41 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-31 05:43:41 +0000 |
commit | f50684e83a2a3ef71556e276d03534a5d9bbb500 (patch) | |
tree | 7956f8e336b43b7ffbccde40781000907f2d7fa9 | |
parent | ba32174f699657690d4a710e4de84fe7ce16c6aa (diff) | |
download | portage-f50684e83a2a3ef71556e276d03534a5d9bbb500.tar.gz portage-f50684e83a2a3ef71556e276d03534a5d9bbb500.tar.bz2 portage-f50684e83a2a3ef71556e276d03534a5d9bbb500.zip |
Make automatic "global updates" always use the config instance that's associated with /, since the rest of the code is targeted at /.
svn path=/main/trunk/; revision=6687
-rwxr-xr-x | bin/fixpackages | 2 | ||||
-rw-r--r-- | pym/emerge/__init__.py | 4 | ||||
-rw-r--r-- | pym/portage/__init__.py | 5 |
3 files changed, 5 insertions, 6 deletions
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/emerge/__init__.py b/pym/emerge/__init__.py index 5189c6e2d..c653104a9 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4338,7 +4338,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) @@ -5384,7 +5384,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/pym/portage/__init__.py b/pym/portage/__init__.py index 1448133f2..dda87bd71 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5009,12 +5009,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 @@ -5028,6 +5026,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: |