Bug #303401 - Fix emerge.log disabling code that's been broken since
authorZac Medico <zmedico@gentoo.org>
Thu, 4 Feb 2010 23:00:41 +0000 (23:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 4 Feb 2010 23:00:41 +0000 (23:00 -0000)
portage-2.1.7 when the _emerge module got split up.

svn path=/main/trunk/; revision=15322

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 68d6aa466ff3f0bf087df073f03abfb616eaa25f..f66b0bb5c4044e60488a075e1810d6aa36bb2cad 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
@@ -1395,9 +1396,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: