From: Zac Medico Date: Tue, 2 Mar 2010 20:07:40 +0000 (-0000) Subject: Bug #303401 - Fix emerge.log disabling code that's been broken since X-Git-Tag: v2.1.8~167 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f67d45fc4aeffd75465080321d8d2b314ed89ae3;p=portage.git Bug #303401 - Fix emerge.log disabling code that's been broken since portage-2.1.7 when the _emerge module got split up. (trunk r15322) svn path=/main/branches/2.1.7/; revision=15555 --- diff --git a/pym/_emerge/emergelog.py b/pym/_emerge/emergelog.py index dbb0812ff..b25ec29b7 100644 --- a/pym/_emerge/emergelog.py +++ b/pym/_emerge/emergelog.py @@ -15,9 +15,13 @@ from portage.data import secpass from portage.output import xtermTitle _emerge_log_dir = '/var/log' +_disable = False def emergelog(xterm_titles, mystr, short_msg=None): + if _disable: + return + mystr = portage._unicode_decode(mystr) if short_msg is not None: diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 40cd0a2b3..c53ecd4a9 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -40,6 +40,7 @@ from _emerge.actions import action_config, action_sync, action_metadata, \ action_regen, action_search, action_uninstall, action_info, action_build, \ adjust_configs, chk_updated_cfg_files, display_missing_pkg_set, \ display_news_notification, getportageversion, load_emerge_config +import _emerge from _emerge.emergelog import emergelog from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo from _emerge.is_valid_package_atom import is_valid_package_atom @@ -1250,9 +1251,7 @@ def emerge_main(): operations. This helps minimize parallel emerge.log entries that can confuse log parsers. We especially want it disabled during parallel-fetch, which uses --resume --fetchonly.""" - global emergelog - def emergelog(*pargs, **kargs): - pass + _emerge.emergelog._disable = True else: if 'EMERGE_LOG_DIR' in settings: