diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-11-09 20:51:20 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-11-09 20:51:20 +0000 |
commit | 13c42af3d875fd4e4752e3fe1ccf997ad33f5ead (patch) | |
tree | 87e859ca5245e02be43e7e9d57a3324d73860dfb | |
parent | 5b469f94d2a1155ded74dfa2666d2dd80e1922b1 (diff) | |
download | portage-13c42af3d875fd4e4752e3fe1ccf997ad33f5ead.tar.gz portage-13c42af3d875fd4e4752e3fe1ccf997ad33f5ead.tar.bz2 portage-13c42af3d875fd4e4752e3fe1ccf997ad33f5ead.zip |
Bug #278336 - Use adjust_config to set PORTAGE_QUIET when the config is
reloaded after sync, so that PORTAGE_QUIET is set when the post_sync
script is executed.
svn path=/main/trunk/; revision=14805
-rw-r--r-- | pym/_emerge/actions.py | 9 | ||||
-rw-r--r-- | pym/_emerge/main.py | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 7f728cef6..7085720b8 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2144,6 +2144,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 @@ -2158,6 +2159,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"] @@ -2290,6 +2292,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.""" diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 2a854fe05..07a502bea 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -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 @@ -1181,13 +1181,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() |