GNU bug report logs - #54022
[PATCH] python: fix exit status handling with uninstall

Previous Next

Package: automake-patches;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Wed, 16 Feb 2022 03:39:02 UTC

Severity: normal

Tags: patch

Done: Mike Frysinger <vapier <at> gentoo.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54022 in the body.
You can then email your comments to 54022 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to automake-patches <at> gnu.org:
bug#54022; Package automake-patches. (Wed, 16 Feb 2022 03:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Frysinger <vapier <at> gentoo.org>:
New bug report received and forwarded. Copy sent to automake-patches <at> gnu.org. (Wed, 16 Feb 2022 03:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: automake-patches <at> gnu.org
Subject: [PATCH] python: fix exit status handling with uninstall
Date: Tue, 15 Feb 2022 22:38:06 -0500
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





Information forwarded to automake-patches <at> gnu.org:
bug#54022; Package automake-patches. (Wed, 16 Feb 2022 22:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 54022 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: vapier <at> gentoo.org
Cc: 54022 <at> debbugs.gnu.org
Subject: Re: [bug#54022] [PATCH] python: fix exit status handling with
 uninstall
Date: Wed, 16 Feb 2022 15:10:59 -0700
    * lib/am/python.am: Fix final subshell exit status passing.

Looks good to me, FWIW. -k




bug closed, send any further explanations to 54022 <at> debbugs.gnu.org and Mike Frysinger <vapier <at> gentoo.org> Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Thu, 17 Feb 2022 04:41:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Mar 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.