Bug #278336 - Use adjust_config to set PORTAGE_QUIET when the config is
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Nov 2009 00:29:54 +0000 (00:29 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Nov 2009 00:29:54 +0000 (00:29 -0000)
reloaded after sync, so that PORTAGE_QUIET is set when the post_sync
script is executed. (trunk r14805)

svn path=/main/branches/2.1.7/; revision=14828

pym/_emerge/actions.py
pym/_emerge/main.py

index ac4cf999e65de68dc486847d50d9cc1e80a6d7e8..092f345101d677f1de4c158980dc0109e1aad03e 100644 (file)
@@ -1968,6 +1968,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
 
        # Reload the whole config from scratch.
        settings, trees, mtimedb = load_emerge_config(trees=trees)
+       adjust_configs(myopts, trees)
        root_config = trees[settings["ROOT"]]["root_config"]
        portdb = trees[settings["ROOT"]]["porttree"].dbapi
 
@@ -1982,6 +1983,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
                mtimedb.commit()
                # Reload the whole config from scratch.
                settings, trees, mtimedb = load_emerge_config(trees=trees)
+               adjust_configs(myopts, trees)
                portdb = trees[settings["ROOT"]]["porttree"].dbapi
                root_config = trees[settings["ROOT"]]["root_config"]
 
@@ -2114,6 +2116,13 @@ def action_uninstall(settings, trees, ldpath_mtimes,
 
        return rval
 
+def adjust_configs(myopts, trees):
+       for myroot in trees:
+               mysettings =  trees[myroot]["vartree"].settings
+               mysettings.unlock()
+               adjust_config(myopts, mysettings)
+               mysettings.lock()
+
 def adjust_config(myopts, settings):
        """Make emerge specific adjustments to the config."""
 
index 6613c453bfde9be8507c618cfcae85d549b4b4d8..baf0a797b2938bf0753bbf90545b675aedbdd476 100644 (file)
@@ -37,7 +37,7 @@ from portage._sets import SETPREFIX
 
 from _emerge.actions import action_config, action_sync, action_metadata, \
        action_regen, action_search, action_uninstall, action_info, action_build, \
-       adjust_config, chk_updated_cfg_files, display_missing_pkg_set, \
+       adjust_configs, chk_updated_cfg_files, display_missing_pkg_set, \
        display_news_notification, getportageversion, load_emerge_config
 from _emerge.emergelog import emergelog
 from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo
@@ -1039,13 +1039,7 @@ def emerge_main():
                settings, trees, mtimedb = load_emerge_config(trees=trees)
                portdb = trees[settings["ROOT"]]["porttree"].dbapi
 
-       for myroot in trees:
-               mysettings =  trees[myroot]["vartree"].settings
-               mysettings.unlock()
-               adjust_config(myopts, mysettings)
-               mysettings.lock()
-               del myroot, mysettings
-
+       adjust_configs(myopts, trees)
        apply_priorities(settings)
 
        spinner = stdout_spinner()