automake-patches
[Top][All Lists]
Advanced

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

FYI: fix install-info --version probe


From: Alexandre Duret-Lutz
Subject: FYI: fix install-info --version probe
Date: Fri, 03 Oct 2003 10:57:48 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

I'm installing this patch on HEAD and branch-1-7.  
I think it is serious enough to warrant a 1.7.8 release.

I don't know how the existing code could work.  Not
running `sed 1q' before `grep -v' is clearly wrong.
Not using 2>&1 when there is a comment saying 
"version X outputs on stderr" looks like a mistake too (but
this one is harmless since grep -v' will fail as expected).

Apparently is that this was not causing too much trouble on
Debian so far because /usr/sbin/install-info was not in the path
during build, and --version did output to stderr.  But this has
changed.

   http://bugs.debian.org/213524
   http://bugs.debian.org/213494
   http://bugs.debian.org/213495


2003-10-03  Alexandre Duret-Lutz  <address@hidden>

        For Debian Bug #213524:
        * lib/am/texinfos.am (install-info-am, uninstall-info-am): Merge
        stderr and stdout, and grep only the first line while testing
        install-info --version's output.  This revert part of the change
        from 2001-05-18.

Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.403.2.40
diff -u -r1.403.2.40 Makefile.in
--- Makefile.in 26 Sep 2003 16:08:30 -0000      1.403.2.40
+++ Makefile.in 3 Oct 2003 08:37:13 -0000
@@ -245,7 +245,7 @@
 uninstall-info-am:
        $(PRE_UNINSTALL)
        @if (install-info --version && \
-            install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -621,7 +621,7 @@
        done
        @$(POST_INSTALL)
        @if (install-info --version && \
-            install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.98.2.3
diff -u -r1.98.2.3 texinfos.am
--- lib/am/texinfos.am  19 Feb 2003 19:13:08 -0000      1.98.2.3
+++ lib/am/texinfos.am  3 Oct 2003 08:37:15 -0000
@@ -144,15 +144,16 @@
        @$(POST_INSTALL)
 ## Only run this code if install-info actually exists, and it is not
 ## the Debian install-info.  FIXME: once Debian install-info goes
-## away, we can remove this hack.  Debian install-info v1.8.3
-## prints version info to stderr.
+## away, we can remove this hack.  Some versions of Debian install-info
+## print their version on stderr (e.g. 1.8.3), other do it in
+## on stdout (e.g. 1.10.15).
 ##
 ## Do not use
-##    install-info --version 2>&1 | sed 1q | grep -s -v -i debian
+##    install-info --version 2>&1 | sed 1q | grep -v -i debian
 ## as if install-info does not exist, grep -v will be happy, and
 ## therefore the code will be triggered although install-info is missing.
        @if (install-info --version && \
-            install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
 ## Strip directory
@@ -187,10 +188,9 @@
 uninstall-info-am:
        $(PRE_UNINSTALL)
 ## Run two loops here so that we can handle PRE_UNINSTALL and
-## NORMAL_UNINSTALL correctly.  Debian install-info v1.8.3 prints
-## version info to stderr.
+## NORMAL_UNINSTALL correctly.
        @if (install-info --version && \
-            install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \

-- 
Alexandre Duret-Lutz





reply via email to

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