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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 993A2158089 for ; Fri, 15 Sep 2023 04:28:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2E292BC017; Fri, 15 Sep 2023 04:28:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B3F972BC017 for ; Fri, 15 Sep 2023 04:28:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8271B335CE9 for ; Fri, 15 Sep 2023 04:28:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D134B1190 for ; Fri, 15 Sep 2023 04:28:26 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1694752103.b2c91af6fb2dfdd227caf9a2eff588f02d2bf9fc.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/dbapi/vartree.py X-VCS-Directories: lib/portage/dbapi/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b2c91af6fb2dfdd227caf9a2eff588f02d2bf9fc X-VCS-Branch: master Date: Fri, 15 Sep 2023 04:28:26 +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: 5ceb5aae-2842-4edd-9b25-ede8f2d1630b X-Archives-Hash: f21d8da655a3382f8b59a879bfa1ed0b commit: b2c91af6fb2dfdd227caf9a2eff588f02d2bf9fc Author: Oskari Pirhonen gmail com> AuthorDate: Tue Sep 5 01:21:22 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 15 04:28:23 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b2c91af6 vartree: keep build dir if postinst fails Bug: https://bugs.gentoo.org/704866 Signed-off-by: Oskari Pirhonen gmail.com> Signed-off-by: Sam James gentoo.org> lib/portage/dbapi/vartree.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py index 7d1bba712e..08ea9234f6 100644 --- a/lib/portage/dbapi/vartree.py +++ b/lib/portage/dbapi/vartree.py @@ -6070,8 +6070,11 @@ class dblink: ebuild_phase.wait() self._elog_process() - if "noclean" not in self.settings.features and ( - retval == os.EX_OK or "fail-clean" in self.settings.features + # Keep the build dir around if postinst fails (bug #704866) + if ( + not self._postinst_failure + and "noclean" not in self.settings.features + and (retval == os.EX_OK or "fail-clean" in self.settings.features) ): if myebuild is None: myebuild = os.path.join(inforoot, self.pkg + ".ebuild")