From unknown Sun Jun 15 08:30:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54022 <54022@debbugs.gnu.org> To: bug#54022 <54022@debbugs.gnu.org> Subject: Status: [PATCH] python: fix exit status handling with uninstall Reply-To: bug#54022 <54022@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:30:48 +0000 retitle 54022 [PATCH] python: fix exit status handling with uninstall reassign 54022 automake-patches submitter 54022 Mike Frysinger severity 54022 normal tag 54022 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 15 22:38:19 2022 Received: (at submit) by debbugs.gnu.org; 16 Feb 2022 03:38:19 +0000 Received: from localhost ([127.0.0.1]:47068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKB91-0003nS-1Z for submit@debbugs.gnu.org; Tue, 15 Feb 2022 22:38:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:49508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKB8y-0003nG-Jt for submit@debbugs.gnu.org; Tue, 15 Feb 2022 22:38:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKB8y-0001Ot-E4 for automake-patches@gnu.org; Tue, 15 Feb 2022 22:38:16 -0500 Received: from [2001:470:ea4a:1:5054:ff:fec7:86e4] (port=35637 helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1nKB8u-0003qQ-Lx for automake-patches@gnu.org; Tue, 15 Feb 2022 22:38:14 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id C970534326E; Wed, 16 Feb 2022 03:38:09 +0000 (UTC) From: Mike Frysinger To: automake-patches@gnu.org Subject: [PATCH] python: fix exit status handling with uninstall Date: Tue, 15 Feb 2022 22:38:06 -0500 Message-Id: <20220216033806.22963-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:470:ea4a:1:5054:ff:fec7:86e4 (failed) Received-SPF: pass client-ip=2001:470:ea4a:1:5054:ff:fec7:86e4; envelope-from=vapier@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) The st variable is set at the top of this shell script, and then here is a pipeline where it tries to update it in the subshell. But since setting variables in a subshell doesn't propagate back up, it doesn't actually work. Have the final subshell in the pipeline manage its own exit status and exit with that so that the final status of the pipeline is the right value. * lib/am/python.am: Fix final subshell exit status passing. --- lib/am/python.am | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/am/python.am b/lib/am/python.am index 8c302090aae8..e5e9dfe3bd42 100644 --- a/lib/am/python.am +++ b/lib/am/python.am @@ -118,9 +118,11 @@ uninstall-%DIR%PYTHON: ## into account. Avoid exceeding the command-line length limit. dir='$(DESTDIR)$(%NDIR%dir)'; \ echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \ - while read files; do \ - $(am__uninstall_files_from_dir) || st=$$?; \ - done || exit $$?; \ + ( sst=0; \ + while read files; do \ + $(am__uninstall_files_from_dir) || sst=$$?; \ + done; \ + exit $$sst ) || st=$$?; \ exit $$st endif %?INSTALL% -- 2.34.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 16 17:11:04 2022 Received: (at 54022) by debbugs.gnu.org; 16 Feb 2022 22:11:04 +0000 Received: from localhost ([127.0.0.1]:49636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKSVs-0007Mh-7Z for submit@debbugs.gnu.org; Wed, 16 Feb 2022 17:11:04 -0500 Received: from freefriends.org ([96.88.95.60]:41406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKSVq-0007MH-Ad for 54022@debbugs.gnu.org; Wed, 16 Feb 2022 17:11:03 -0500 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 21GMB0SF026662 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Feb 2022 15:11:01 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 21GMAxw9026661; Wed, 16 Feb 2022 15:10:59 -0700 Date: Wed, 16 Feb 2022 15:10:59 -0700 Message-Id: <202202162210.21GMAxw9026661@freefriends.org> From: Karl Berry To: vapier@gentoo.org Subject: Re: [bug#54022] [PATCH] python: fix exit status handling with uninstall In-Reply-To: <20220216033806.22963-1-vapier@gentoo.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54022 Cc: 54022@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * lib/am/python.am: Fix final subshell exit status passing. Looks good to me, FWIW. -k From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 16 23:40:30 2022 Received: (at control) by debbugs.gnu.org; 17 Feb 2022 04:40:30 +0000 Received: from localhost ([127.0.0.1]:49808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKYak-0000Gd-39 for submit@debbugs.gnu.org; Wed, 16 Feb 2022 23:40:30 -0500 Received: from woodpecker.gentoo.org ([140.211.166.183]:47110 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKYaj-0000GQ-84 for control@debbugs.gnu.org; Wed, 16 Feb 2022 23:40:29 -0500 Received: by smtp.gentoo.org (Postfix, from userid 559) id F1923335C5D; Thu, 17 Feb 2022 04:40:22 +0000 (UTC) From: Mike Frysinger To: control@debbugs.gnu.org Subject: Control message Message-Id: <20220217044022.F1923335C5D@smtp.gentoo.org> Date: Thu, 17 Feb 2022 04:40:22 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) close 54022 thankyou From unknown Sun Jun 15 08:30:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Mar 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator