From: Zac Medico Date: Sat, 3 Sep 2011 23:32:50 +0000 (-0700) Subject: Join /var/log/emerge.log with EPREFIX. X-Git-Tag: v2.2.0_alpha53~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fe01dc23324660ae18c732cfacd458c3faf50ad7;p=portage.git Join /var/log/emerge.log with EPREFIX. --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index b3e047c9d..b6b63e2fd 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1786,7 +1786,11 @@ def emerge_main(args=None): if x in myopts: disable_emergelog = True break - if myaction in ("search", "info"): + if disable_emergelog: + pass + elif myaction in ("search", "info"): + disable_emergelog = True + elif portage.data.secpass < 1: disable_emergelog = True _emerge.emergelog._disable = disable_emergelog @@ -1801,8 +1805,13 @@ def emerge_main(args=None): "EMERGE_LOG_DIR='%s':\n!!! %s\n" % \ (settings['EMERGE_LOG_DIR'], e), noiselevel=-1, level=logging.ERROR) + portage.util.ensure_dirs(_emerge.emergelog._emerge_log_dir) else: _emerge.emergelog._emerge_log_dir = settings["EMERGE_LOG_DIR"] + else: + _emerge.emergelog._emerge_log_dir = os.path.join(os.sep, + settings["EPREFIX"].lstrip(os.sep), "var", "log") + portage.util.ensure_dirs(_emerge.emergelog._emerge_log_dir) if not "--pretend" in myopts: emergelog(xterm_titles, "Started emerge on: "+\