Bug #303401 - Fix emerge.log disabling code that's been broken since
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:07:40 +0000 (20:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 20:07:40 +0000 (20:07 -0000)
portage-2.1.7 when the _emerge module got split up. (trunk r15322)

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

pym/_emerge/emergelog.py
pym/_emerge/main.py

index dbb0812ff355ddbc2ef3f291fcbf0fafd6e6945b..b25ec29b7ab3d20c1d6e68805475fe97061260da 100644 (file)
@@ -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:
index 40cd0a2b3770515cf36b06ab9583f719b8b016b9..c53ecd4a9c030d501e4ec15f9eda0cec9d92371e 100644 (file)
@@ -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: