From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C92DD138359 for ; Sun, 9 Aug 2020 00:16:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F0232E0946; Sun, 9 Aug 2020 00:16:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 908AFE0946 for ; Sun, 9 Aug 2020 00:16:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 35F5434EFFE for ; Sun, 9 Aug 2020 00:15:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A2CC0303 for ; Sun, 9 Aug 2020 00:15:57 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1596929103.0b4b5eae5555fafcfa314465ae1094da00687779.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/BinpkgEnvExtractor.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0b4b5eae5555fafcfa314465ae1094da00687779 X-VCS-Branch: master Date: Sun, 9 Aug 2020 00:15:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2ee44dae-f8f2-4ec3-ac5a-838cc9051e4a X-Archives-Hash: f9a90528897e29979057344b0ba65ede commit: 0b4b5eae5555fafcfa314465ae1094da00687779 Author: Zac Medico gentoo org> AuthorDate: Sat Aug 8 22:16:34 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Aug 8 23:25:03 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0b4b5eae BinpkgEnvExtractor: fix subprocess logfile usage (bug 711174) Do not write to log file when in a MergeProcess subprocess, since stdout and stderr are already redirected to the log file by MergeProcess. This fixes log corruption when BinpkgEnvExtractor is use to extract environment.bz2 prior to pkg_prerm. Bug: https://bugs.gentoo.org/711174 Signed-off-by: Zac Medico gentoo.org> lib/_emerge/BinpkgEnvExtractor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/_emerge/BinpkgEnvExtractor.py b/lib/_emerge/BinpkgEnvExtractor.py index b19586e83..9398b493c 100644 --- a/lib/_emerge/BinpkgEnvExtractor.py +++ b/lib/_emerge/BinpkgEnvExtractor.py @@ -33,12 +33,17 @@ class BinpkgEnvExtractor(CompositeTask): shell_cmd = "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d} -c -- %s > %s" % \ (_shell_quote(saved_env_path), _shell_quote(dest_env_path)) + + logfile = None + if self.settings.get("PORTAGE_BACKGROUND") != "subprocess": + logfile = self.settings.get("PORTAGE_LOG_FILE") + extractor_proc = SpawnProcess( args=[BASH_BINARY, "-c", shell_cmd], background=self.background, env=self.settings.environ(), scheduler=self.scheduler, - logfile=self.settings.get('PORTAGE_LOG_FILE')) + logfile=logfile) self._start_task(extractor_proc, self._extractor_exit)