Hello,

On my old Linux box (Intel Pentium 200 MMX, Debian bo, kernel 2.0.40,
gcc 2.7.2.1, libc 5.4.33, GNU ld cygnus-2.7.1, libiconv 1.12, pth 2.0.7,
i586-pc-linux-gnulibc1, autoconf 2.61, fileutils 3.16, Make 3.75,
bash 2.0.0(1)) during automake 1.10.1 build, make check fails one test:

| FAIL: instsh2.test

The cause is an invalid date format for touch:

| $ ./instsh2.test
| [...]
| + touch -t 198309271735.59 d1/file
| touch: invalid date format `198309271735.59'

Indeed this old touch from fileutils 3.16 used a different format, with
the year at the end:

| $ touch --help
| [...]
|   -d, --date=STRING      parse STRING and use it instead of current time
|   -t STAMP               use MMDDhhmm[[CC]YY][.ss] instead of current time

Once the -t stamp reordered, or replaced by -d "27 Sep 1983 17:35:59 UTC",
this test succeeds. touch-format.patch attached.


Alain.
diff -prud automake-1.10.1/tests/defs.in automake-1.10.1.mod/tests/defs.in
--- automake-1.10.1/tests/defs.in       Mon Jan 21 23:11:41 2008
+++ automake-1.10.1.mod/tests/defs.in   Thu Apr  3 10:37:02 2008
@@ -328,11 +328,11 @@ sleep='sleep @MODIFICATION_DELAY@'
 testsrcdir=$srcdir
 unset srcdir
 
-# An old timestamp that can be given to a file, in "touch -t" format.
+# An old timestamp that can be given to a file, in "touch -d" format.
 # The time stamp should be portable to all file systems of interest.
 # Just for fun, choose the exact time of the announcement of the GNU project
 # in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
-old_timestamp=198309271735.59
+old_timestamp="27 Sep 1983 17:35:59 UTC"
 
 # is_newest FILE FILES
 # --------------------
diff -prud automake-1.10.1/tests/instsh2.test 
automake-1.10.1.mod/tests/instsh2.test
--- automake-1.10.1/tests/instsh2.test  Mon Jan 21 23:11:41 2008
+++ automake-1.10.1.mod/tests/instsh2.test      Thu Apr  3 10:28:59 2008
@@ -84,7 +84,7 @@ test -f d3/y
 # Do not change the timestamps when using -C.
 echo foo >file
 ./install-sh -C file d1
-TZ=UTC0 touch -t $old_timestamp d1/file
+touch -d "$old_timestamp" d1/file
 ./install-sh -C file d1
 is_newest file d1/file
 echo foo1 >file

Reply via email to