bug-automake
[Top][All Lists]
Advanced

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

Re: Infinite loop in mdate-sh


From: Alexandre Duret-Lutz
Subject: Re: Infinite loop in mdate-sh
Date: Wed, 29 Jun 2005 22:29:11 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Thanks all, and sorry for the delay.  I'm installing the
following on HEAD and branch-1-9.

(I think any justification of why unset must not be used really
belongs to the Autoconf manual.)

2005-06-28  Stepan Kasal  <address@hidden>
            Alexandre Duret-Lutz  <address@hidden>

        * lib/mdate-sh: Avoid infinite loop with GNU ls when TIME_STYLE is set.
        * tests/txinfo28.test: Set TIME_STYLE.
        Report from Vincent Lefevre and James Youngman.

Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.270
diff -u -r1.270 THANKS
--- THANKS      23 Jun 2005 22:19:55 -0000      1.270
+++ THANKS      29 Jun 2005 20:15:59 -0000
@@ -269,6 +269,7 @@
 Ulrich Eckhardt                address@hidden
 Václav Haisman         address@hidden
 Vadim Zeitlin          address@hidden
+Vincent Lefevre                Vincent Lefevre <address@hidden>
 Volker Boerchers       address@hidden
 Werner John            address@hidden
 Werner Koch            address@hidden
Index: lib/mdate-sh
===================================================================
RCS file: /cvs/automake/automake/lib/mdate-sh,v
retrieving revision 1.17
diff -u -r1.17 mdate-sh
--- lib/mdate-sh        14 May 2005 20:28:50 -0000      1.17
+++ lib/mdate-sh        29 Jun 2005 20:15:59 -0000
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2005-05-14.22
+scriptversion=2005-06-29.22
 
 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software
 # Foundation, Inc.
@@ -59,7 +59,15 @@
 LC_TIME=C
 export LC_TIME
 
-save_arg1="$1"
+# GNU ls changes its time format in response to the TIME_STYLE
+# variable.  Since we cannot assume `unset' works, revert this
+# variable to its documented default.
+if test "${TIME_STYLE+set}" = set; then
+  TIME_STYLE=posix-long-iso
+  export TIME_STYLE
+fi
+
+save_arg1=$1
 
 # Find out how to get the extended ls output of a file or directory.
 if ls -L /dev/null 1>/dev/null 2>&1; then
Index: tests/txinfo28.test
===================================================================
RCS file: /cvs/automake/automake/tests/txinfo28.test,v
retrieving revision 1.3
diff -u -r1.3 txinfo28.test
--- tests/txinfo28.test 14 May 2005 20:28:56 -0000      1.3
+++ tests/txinfo28.test 29 Jun 2005 20:16:00 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -27,6 +27,11 @@
 
 set -e
 
+# This setting, when honored by GNU ls, used to cause an infinite loop
+# in mdate-sh.
+TIME_STYLE="+%Y-%m-%d %H:%M:%S"
+export TIME_STYLE
+
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am << 'END'

-- 
Alexandre Duret-Lutz





reply via email to

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