[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: distcheck fails with autotest: autom4te: cannot open ../../tests/tes
From: |
Jim Meyering |
Subject: |
Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied |
Date: |
Fri, 02 Nov 2007 19:32:34 +0100 |
Ralf Wildenhues <address@hidden> wrote:
..
> | 2007-10-28 Jim Meyering <address@hidden>
> [...]
> | * tests/Makefile.am ($(srcdir)/package.m4): Depend on Makefile,
> | not configure.ac, now that the version number changes automatically.
>
> Yuck, that's ugly. Should we have a VERSION file, changed by a commit
> hook or something like that?
Hi Benoit and Ralf,
A non-version-controlled file that's updated upon every commit?
Maybe. Or have configure generate this VERSION file.
...
> If I use a subshell for redirection, the shell exits nonzero:
>
> $ touch a && chmod -w a
> $ sh -c '{ echo foo; } > a'; echo $?
> sh: a: Permission denied
> 0
> $ sh -c '( echo foo; ) > a'; echo $?
> sh: a: Permission denied
> 1
>
> This is bash 3.1.17(1), but also happens with 3.2.0(2); not with pdksh.
> Isn't that a bash bug?
Ouch. I haven't looked at the spec yet, but I sure don't
like that behavior. zsh-4.3.4 works the way I would expect:
$ zsh -c '{ echo foo; } > a'; echo $?
zsh: permission denied: a
1
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 4c3ad1a..dc1b827 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -35,14 +35,14 @@ include ../lib/freeze.mk
> ## ------------ ##
>
> $(srcdir)/package.m4: Makefile
> - { \
> + ( \
> echo '# Signature of the current package.'; \
> echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
> echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
> echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
> echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
> echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
> - } >$(srcdir)/package.m4
> + ) >$(srcdir)/package.m4
That looks fine.
It's a shame to pessimize the code, making everyone incur the subshell
cost, to work around such a bug (assuming it is one).
It'd be nice if there were a way to require a working shell.
In the mean time, if you haven't committed it yet, would you please add
a comment so we'll know why it's using a seemingly unnecessary subshell.
- distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Benoit SIGOURE, 2007/11/01
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Ralf Wildenhues, 2007/11/02
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Benoit SIGOURE, 2007/11/02
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Ralf Wildenhues, 2007/11/02
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied,
Jim Meyering <=
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Ralf Wildenhues, 2007/11/02
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Jim Meyering, 2007/11/02
- m4_version_compare and new version numbering [was: distcheck fails with autotest...], Eric Blake, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Benoit SIGOURE, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Andreas Schwab, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Andreas Schwab, 2007/11/03
- Re: m4_version_compare and new version numbering, Eric Blake, 2007/11/03