automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: python: fix exit status handlin


From: Mike Frysinger
Subject: [automake-commit] branch master updated: python: fix exit status handling with uninstall
Date: Wed, 16 Feb 2022 23:39:56 -0500

This is an automated email from the git hooks/post-receive script.

vapier pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=6097de0a54d70f7724c333a05e85299c0d2f3876

The following commit(s) were added to refs/heads/master by this push:
     new 6097de0a5 python: fix exit status handling with uninstall
6097de0a5 is described below

commit 6097de0a54d70f7724c333a05e85299c0d2f3876
Author: Mike Frysinger <vapier@gentoo.org>
AuthorDate: Tue Feb 15 22:25:35 2022 -0500

    python: fix exit status handling with uninstall
    
    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 8c302090a..e5e9dfe3b 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%
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]