unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
@ 2016-02-04 18:18 David Caldwell
  2016-02-05  2:32 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: David Caldwell @ 2016-02-04 18:18 UTC (permalink / raw)
  To: 22556

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]


Hello,

Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
'./autogen.sh'. It's requiring me to invoke it with the 'autoconf'
parameter. A quick peek at the source looks like it should be automatic,
but I think there's a bug in the shell code. At least, I needed this
change to make the 'autoconf' automatic under bash. I don't know enough
about the differences between bash and pure POSIX shells to know if this
is correct everywhere, but it fixes the issue for me:

diff --git a/autogen.sh b/autogen.sh
index 2ed58e1..c5c8d51 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -106,7 +106,7 @@ check_version ()
 do_autoconf=false
 do_git=false

-for arg in ${*-autoconf}; do
+for arg in ${*:-autoconf}; do
     case $arg in
       --help)
        exec echo "$0: usage: $0 [all|autoconf|git]";;




[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
  2016-02-04 18:18 bug#22556: 25.0.90; autogen.sh automatic parameter isn't working David Caldwell
@ 2016-02-05  2:32 ` Glenn Morris
  2016-02-05  3:06   ` David Caldwell
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2016-02-05  2:32 UTC (permalink / raw)
  To: David Caldwell; +Cc: 22556, Paul Eggert

David Caldwell wrote:

> Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
> './autogen.sh'. It's requiring me to invoke it with the 'autoconf'
> parameter. A quick peek at the source looks like it should be automatic,
> but I think there's a bug in the shell code. At least, I needed this
> change to make the 'autoconf' automatic under bash.

I don't see the issue with bash, but I do with eg dash.

> -for arg in ${*-autoconf}; do
> +for arg in ${*:-autoconf}; do

The autoconf manual says that this is portable to all shells that
support functions, so it should be fine, since autogen.sh uses
functions.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
  2016-02-05  2:32 ` Glenn Morris
@ 2016-02-05  3:06   ` David Caldwell
  2016-02-05 17:41     ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: David Caldwell @ 2016-02-05  3:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 22556, Paul Eggert

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

On 2/4/16 6:32 PM, Glenn Morris wrote:
> David Caldwell wrote:
> 
>> Commit aca31e3815b9bd9c696cf0c74cc4a80ad7e35ec9 seems to have broken
>> './autogen.sh'. It's requiring me to invoke it with the 'autoconf'
>> parameter. A quick peek at the source looks like it should be automatic,
>> but I think there's a bug in the shell code. At least, I needed this
>> change to make the 'autoconf' automatic under bash.
> 
> I don't see the issue with bash, but I do with eg dash.

Whoops, you're right: I'm running this on Debian, where /bin/sh is dash.

I forgot to show the symptom in my original bug report, which was:
$ ./autogen.sh
You can now run './autogen.sh autoconf'.
$

>> -for arg in ${*-autoconf}; do
>> +for arg in ${*:-autoconf}; do
> 
> The autoconf manual says that this is portable to all shells that
> support functions, so it should be fine, since autogen.sh uses
> functions.

Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
portable?

-David



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
  2016-02-05  3:06   ` David Caldwell
@ 2016-02-05 17:41     ` Glenn Morris
  2016-02-05 18:06       ` bug#22556: HEAD; " David Caldwell
  2016-02-05 22:18       ` bug#22556: 25.0.90; " Paul Eggert
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2016-02-05 17:41 UTC (permalink / raw)
  To: David Caldwell; +Cc: 22556, Paul Eggert

David Caldwell wrote:

>> The autoconf manual says that this is portable to all shells that
>> support functions, so it should be fine, since autogen.sh uses
>> functions.
>
> Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
> portable?

I meant that your patch should be fine to apply.
But AFAICS at the next merge from emacs-25 the relevant code will all
disappear anyway. Or there will be a merge conflict.

(BTW, please try to put the right version number in the subject.
I thought this report was about the emacs-25 branch, but it seems it
wasn't.)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22556: HEAD; autogen.sh automatic parameter isn't working
  2016-02-05 17:41     ` Glenn Morris
@ 2016-02-05 18:06       ` David Caldwell
  2016-02-05 22:18       ` bug#22556: 25.0.90; " Paul Eggert
  1 sibling, 0 replies; 6+ messages in thread
From: David Caldwell @ 2016-02-05 18:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 22556, Paul Eggert

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

On 2/5/16 9:41 AM, Glenn Morris wrote:
> David Caldwell wrote:
> 
>>> The autoconf manual says that this is portable to all shells that
>>> support functions, so it should be fine, since autogen.sh uses
>>> functions.
>>
>> Sorry, were you referring to "${*-autoconf}" or "${*:-autoconf}" being
>> portable?
> 
> I meant that your patch should be fine to apply.
> But AFAICS at the next merge from emacs-25 the relevant code will all
> disappear anyway. Or there will be a merge conflict.

If the merge isn't going to happen today, would you mind installing the
patch (I would but I don't have a commit bit)? It's currently causing my
automated builds to break. And if I change the builder to pass the
"autoconf" flag, then if the code goes away in a merge it might break
again tomorrow.

> (BTW, please try to put the right version number in the subject.
> I thought this report was about the emacs-25 branch, but it seems it
> wasn't.)

Apologies, I even looked at it twice and thought it was correct. :-) I
guess I got confused because of the freeze and the recent version changes.

-David



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#22556: 25.0.90; autogen.sh automatic parameter isn't working
  2016-02-05 17:41     ` Glenn Morris
  2016-02-05 18:06       ` bug#22556: HEAD; " David Caldwell
@ 2016-02-05 22:18       ` Paul Eggert
  1 sibling, 0 replies; 6+ messages in thread
From: Paul Eggert @ 2016-02-05 22:18 UTC (permalink / raw)
  To: Glenn Morris, David Caldwell; +Cc: 22556-done

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

On 02/05/2016 09:41 AM, Glenn Morris wrote:
> I meant that your patch should be fine to apply.
> But AFAICS at the next merge from emacs-25 the relevant code will all
> disappear anyway. Or there will be a merge conflict.

I think this problem is present only in master. I installed the attached 
patch, which should fix it. David, thanks for reporting it.

This shell compatibility issue isn't documented in the Autoconf manual, 
so I installed a patch to document it, here:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=5483deb8ae9a6265ce3af0f4c5c574d44cafbcf5

[-- Attachment #2: 0001-autogen.sh-Port-to-dash-Bug-22556.patch --]
[-- Type: application/x-patch, Size: 628 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-05 22:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 18:18 bug#22556: 25.0.90; autogen.sh automatic parameter isn't working David Caldwell
2016-02-05  2:32 ` Glenn Morris
2016-02-05  3:06   ` David Caldwell
2016-02-05 17:41     ` Glenn Morris
2016-02-05 18:06       ` bug#22556: HEAD; " David Caldwell
2016-02-05 22:18       ` bug#22556: 25.0.90; " Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).