Make automatic "global updates" always use the config instance that's associated...
authorZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 05:43:41 +0000 (05:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 05:43:41 +0000 (05:43 -0000)
svn path=/main/trunk/; revision=6687

bin/fixpackages
pym/emerge/__init__.py
pym/portage/__init__.py

index 388a9ad44ce3bf70df9f8c143fe9646b48691d1c..39b81366283db0ddb47eaa2ec39c61eba30bc7c5 100755 (executable)
@@ -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."
index 5189c6e2d8251851c4766b90dfdb8b861d195bba..c653104a91123a157a654396c1f432f703c1e079 100644 (file)
@@ -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)
index 1448133f26ba160437c43a9022ec70475b73affc..dda87bd7195286d8cd9c3bce44656c9960ed87d3 100644 (file)
@@ -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: