automake
[Top][All Lists]
Advanced

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

Re: output7.test failure


From: Alexandre Duret-Lutz
Subject: Re: output7.test failure
Date: Sat, 25 Oct 2003 23:49:43 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "Patrick" == Patrick Welche <address@hidden> writes:

[...]

 Patrick> All attached.. There is plenty of sed between
 Patrick> "creating Makefile" and "creating sub/Makefile" :(

That was a wrong track.  

The problem is with tar.  Old versions of tar do not archive
empty directories when passed the `o' flag.  (In our case sub/ is
an empty directory, and in your initial report it is missing
from the source directory.  Hence the failure.)

This behavior of tar was corrected some time ago:

| 1997-02-25  Fran├žois Pinard  <address@hidden>
| 
|         * create.c (dump_file): Allow saving directories even with -o.
|         Reported by Daniel Trinkle.

Version 1.12 was released on 1997-04-25 with this fix.

Apparently NetBSD 1.6.1 still ships with GNU tar 1.11.2 (which
is ten year old), so it has an -o flag that excludes empty
directories, hence the failure.

I'm installing the following patch on HEAD.  It can also be
argued that autoconf should create that directory before
attempting to cd into it, so I'll send a mail to bug-autoconf
momently.


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

        * tests/output7.test: Populate sub/ with a dummy file, so that it
        is not empty.  This fixes a failure reported by Patrick Welche.
        * lib/am/distdir.am: Add note about tar's `-o' option and empty
        directories.

Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.50
diff -u -r1.50 distdir.am
--- lib/am/distdir.am   5 Jul 2003 08:23:18 -0000       1.50
+++ lib/am/distdir.am   25 Oct 2003 21:44:45 -0000
@@ -210,6 +210,13 @@
 ## Note that we don't use GNU tar's `-z' option.  One reason (but not
 ## the only reason) is that some versions of tar (e.g., OSF1)
 ## interpret `-z' differently.
+##
+## The -o option of GNU tar used to exclude empty directories.  This
+## behavior was fixed in tar 1.12 (released on 1997-04-25).  But older
+## versions of tar are still used (for instance NetBSD 1.6.1 ships
+## with tar 1.11.2).  We do not do anything specific w.r.t. this
+## incompatibility since packages where empty directories need to be
+## present in the archive are really unusual.
 
 if %?TOPDIR_P%
 
Index: tests/output7.test
===================================================================
RCS file: /cvs/automake/automake/tests/output7.test,v
retrieving revision 1.1
diff -u -r1.1 output7.test
--- tests/output7.test  23 Sep 2003 08:14:35 -0000      1.1
+++ tests/output7.test  25 Oct 2003 21:44:47 -0000
@@ -43,6 +43,7 @@
 EOF
 
 cat >mk/sub.am <<'EOF'
+EXTRA_DIST = foo
 all-local:
        @echo in--sub
 EOF
@@ -52,6 +53,17 @@
        @echo at--toplevel
 SUBDIRS = mk sub
 EOF
+
+# We have to distribute something in foo, because some versions
+# of tar do not archive empty directories when passed the `o'
+# flags.  (This was fixed in GNU tar 1.12, but older
+# versions are still used: NetBSD 1.6.1 ships with tar 1.11.2).
+#
+# If sub/ is missing from the archive, config.status will fail
+# to compute $ac_abs_srcdir during a VPATH build: config.status
+# is able to create sub/ in the build tree, but it assumes the
+# directory already exists in the source tree.
+echo bar > sub/foo
 
 $ACLOCAL
 $AUTOCONF

-- 
Alexandre Duret-Lutz





reply via email to

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