Hello Paul,
On Fri, Apr 14, 2006 at 06:14:58PM -0700, Paul Eggert wrote:
> While installing this I noticed another
> glitch in this area: sometimes the log is opened in append mode, and
> sometimes not. It's better to be consistent and open it in append
> mode always.
I'm afraid this is a question from basic UNIX classes, but:
What's the difference between:
exec 5>foo
cat >&5 <<END
Prologue
END
and
cat >foo <<END
Prologue
END
exec 5>>foo
What practical consequences can this have? Can you imagine an Autoconf bug
which would be caused by this?
> Eric PAIRE <[EMAIL PROTECTED]> writes:
> [ config.status --recheck calls configure ]
> > config.log cannot be truncated by configure because
> > config.status already opened it (and Windows forbids truncating an
> > open file).
>
> That's kind of a weird bug, but the fix seems fairly harmless so
> I installed the following.
Paul, I have a huge respect for your expertize, and my knowledge cannot be
compared to yours. Yet I'd like to say I'm not sure it was the best idea
to commit the change.
The reason is that I think we are in a ``freeze'' now.
I hoped that the 2.59c release could become a full release in a few weeks.
But that means we should make only minimal changes, which are immediately
required by the bugs reported, and that we should hold back all other
development.
(A particular concern/superstition is about 5>&- to close a file descriptor;
it seems that Autoconf wasn't using this so far, so we can find a bug in
a version of an OS via this.)
So I'd like to propose to hold back your changes until after the release.
All we should commit now is a fix for the bug reported.
(Yes, the Christian fast has just ended (in most churches), but we should
start another one in the Church of Autoconf. ;-)
For now, I'd like to concentrate to the bug reported by Eric Paire:
In a strive for a ``minimal'' fix, I'd propose that we just handle --recheck
_before_ redirecting AS_MESSAGE_LOG_FD, not after it.
(I'm not sure this is the best solution, I just want to propose it as an
alternative.)
A patch is attached below. What do you think about it?
Have a nice day,
Stepan Kasal
2006-04-16 Stepan Kasal <[EMAIL PROTECTED]>
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck
before opening config.log, to avoid hitting a bug on MinGW.
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.95
diff -u -r1.95 status.m4
--- lib/autoconf/status.m4 12 Apr 2006 20:40:21 -0000 1.95
+++ lib/autoconf/status.m4 16 Apr 2006 17:59:35 -0000
@@ -1270,6 +1270,21 @@
ac_configure_extra_args="$ac_configure_extra_args --silent"
fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+# Handle the --recheck before opening config.log, which would be soon
+# truncated by $[0] anyway.
+# This also prevents a bug on MinGW, where the system would refuse to
+# truncate config.log at the beginning of $[0].
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $[0] " $ac_configure_args
\$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$[0]" $ac_configure_args \$ac_configure_extra_args --no-create
--no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
dnl Open the log:
m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl
exec AS_MESSAGE_LOG_FD>>config.log
@@ -1281,12 +1296,6 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $[0] " $ac_configure_args
\$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
- CONFIG_SHELL=$SHELL
- export CONFIG_SHELL
- exec $SHELL "$[0]" $ac_configure_args \$ac_configure_extra_args --no-create
--no-recursion
-fi
m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],
[#
# INIT-COMMANDS