automake-patches
[Top][All Lists]
Advanced

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

[PATCH 2/4] missing: if GNU tar exists but fails when called, give up


From: Stefano Lattarini
Subject: [PATCH 2/4] missing: if GNU tar exists but fails when called, give up
Date: Sun, 30 Oct 2011 12:15:48 +0100

* lib/missing: If the code trying to run GNU tar is reached,
don't continue if the invoked GNU tar program fails, as there
is little point in doing so (and can even be confusing and
counter-productive).
---
 ChangeLog   |    8 ++++++++
 lib/missing |    9 ++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bb5afed..88d25a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-10-30  Stefano Lattarini  <address@hidden>
 
+       missing: if GNU tar exists but fails when called, give up
+       * lib/missing: If the code trying to run GNU tar is reached,
+       don't continue if the invoked GNU tar program fails, as there
+       is little point in doing so (and can even be confusing and
+       counter-productive).
+
+2011-10-30  Stefano Lattarini  <address@hidden>
+
        missing: miscellaneous fixlets
        * lib/missing: Some shells, such as Solaris or FreeBSD /bin/sh,
        warn about missing programs before performing redirections.
diff --git a/lib/missing b/lib/missing
index 06b5cdd..8312be8 100755
--- a/lib/missing
+++ b/lib/missing
@@ -320,14 +320,13 @@ WARNING: \`$1' is $msg.  You should only need it if
 
   tar*)
     shift
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
+    # We have already tried tar in the generic part.  So try with GNU tar.
+    # Look for gnutar/gtar before invocation to avoid ugly error messages.
     if (gnutar --version) > /dev/null 2>&1; then
-       gnutar "$@" && exit 0
+       exec gnutar "$@"
     fi
     if (gtar --version) > /dev/null 2>&1; then
-       gtar "$@" && exit 0
+       exec gtar "$@"
     fi
     firstarg=$1
     if shift; then
-- 
1.7.2.3




reply via email to

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