Skip to contentSkip to conversation

MAKEALL problem

PATCH New Belisko Marek 3 participants 9 messages Apr 29, 2011 – May 2, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in 10s
----------------------------------------------------------

Am I missing something or it's really broken?

thanks,

marek

Signature · 15 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw
Quoted 8 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

Quoted 6 lines

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in 10s
----------------------------------------------------------

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw

HI,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in   10s
----------------------------------------------------------

Quoted 4 lines
Quoted 1 line

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

GNOME Terminal 2.32.1

Quoted 4 lines

Best Regards,
J.

regards,

marek

Signature · 15 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw
Quoted 18 lines · Belisko Marek

HI,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in   10s
----------------------------------------------------------

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

GNOME Terminal 2.32.1

it's your terminal

which shell sh/bash/dash/others?

Best Regards,
J.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw
Quoted 19 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 18 lines · Belisko Marek

HI,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in   10s
----------------------------------------------------------

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

GNOME Terminal 2.32.1

it's your terminal

which shell sh/bash/dash/others?

bin/sh is symlink to dash

Quoted 4 lines

Best Regards,
J.

regards,

marek

Signature · 15 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw
In reply to Jean-Christophe PLAGNIOL-VILLARD
Quoted 19 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 18 lines · Belisko Marek

HI,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in   10s
----------------------------------------------------------

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

GNOME Terminal 2.32.1

it's your terminal

which shell sh/bash/dash/others?

After some googling and check MAKEALL with checkbashism script this patch fix my problem (work fine on Ubuntu):

1. PIPESTATUS is bashism but hard to replace with something valuable in dash s ojust remove bash array handling

2. source is also bashism. fix it with . replacement.

MAKEALL +2 -2
index e987de2..6c0d017 100755
@@ -77,7 +77,7 @@ stats() {
 }
 
 check_pipe_status() {
-       for i in "${PIPESTATUS[@]}"
+       for i in ${PIPESTATUS}
        do
                [ $i -gt 0 ] && return 1
        done
@@ -234,7 +234,7 @@ then
                CONFIG="./${CONFIG}"
        fi
 
-       source "${CONFIG}"
+       . "${CONFIG}"
 fi
 
 [ -d "${LOGDIR}" ] || mkdir ${LOGDIR} || exit 1
Quoted 4 lines

Best Regards,
J.

regards,

marek

Signature · 15 lines
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
icq: 290551086
web: http://open-nandra.com

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

Hello,

Quoted 51 lines · Belisko Marek
Quoted 19 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 18 lines · Belisko Marek

HI,

Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 13 lines · Belisko Marek

Hi,

current HEAD: 165a1e91f9178f160bc34c00e1d5b356cf022a00 make this problem:

CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ./MAKEALL Building arm a9m2410_defconfig
Configure: ./MAKEALL: 266: Bad substitution

--------------------- SUMMARY ---------------------------- defconfigs compiled: 0
compiled in   10s
----------------------------------------------------------

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

Am I missing something or it's really broken?

no I use it evreyday on barebox or linux

which shell are you using

GNOME Terminal 2.32.1

it's your terminal

which shell sh/bash/dash/others?

After some googling and check MAKEALL with checkbashism script this patch fix my problem (work fine on Ubuntu):

1. PIPESTATUS is bashism but hard to replace with something valuable in dash s ojust remove bash array handling

2. source is also bashism. fix it with . replacement.

MAKEALL +1 -1
index e987de2..6c0d017 100755
@@ -77,7 +77,7 @@ stats() {
 }
 
 check_pipe_status() {
-       for i in "${PIPESTATUS[@]}"
+       for i in ${PIPESTATUS}
        do
                [ $i -gt 0 ] && return 1
        done

MAKEALL then · line 240

Quoted 8 lines
MAKEALL +1 -1
@@ -234,7 +234,7 @@ then
                CONFIG="./${CONFIG}"
        fi
 
-       source "${CONFIG}"
+       . "${CONFIG}"
 fi
 
 [ -d "${LOGDIR}" ] || mkdir ${LOGDIR} || exit 1

Maybe instead use

-#!/bin/sh
+#!/bin/bash

? (I'd fix s/source/./ anyhow.)

Best regards
Uwe

Signature · 7 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hello,

Quoted 9 lines · Belisko Marek

2011/5/2 Uwe Kleine-König <[email protected]>:

Review

Quoted 5 lines

Maybe instead use

(quoted diff) +1 -1
-#!/bin/sh
+#!/bin/bash

IMO this is not generic solution.
Because debian based distros has dash by default in /bin/sh this users must always change MAKEALL script?

Even Debian users should have a bash in /bin/bash though. At least I have :-) Either you or me has a misunderstanding.

Best regards
Uwe

Signature · 7 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH 1/1 Make MAKEALL a bash script

MAKEALL uses the array PIPESTATUS which is a bash extension. A replacement isn't available in other common shells (e.g. dash which provides /bin/sh in Debian since at least Squeeze (6.0))

While at it, use . instead of source which is another bashism. Not necessary any more, but there is no need to use a bash extension if there is a generic way, too.

---

Quoted 7 lines · Uwe Kleine-König

Hello,

Quoted 4 lines · Belisko Marek

2011/5/2 Uwe Kleine-König <[email protected]>:

Quoted 3 lines

Maybe instead use

Quoted 7 lines
Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +1 -1
-#!/bin/sh
+#!/bin/bash

IMO this is not generic solution.
Because debian based distros has dash by default in /bin/sh this users must always change MAKEALL script?

Even Debian users should have a bash in /bin/bash though. At least I have :-) Either you or me has a misunderstanding.

BTW, just doing

- for i in "${PIPESTATUS[@]}"
+ for i in ${PIPESTATUS}

doesn't work:

	$ false | cat
	$ echo ${PIPESTATUS}

So the problem is not that PIPESTATUS isn't an array in dash (which doesn't support arrays at all), but PIPESTATUS just doesn't exist.

Best regards
Uwe

MAKEALL +2 -2
index e987de2..2de5700 100755
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/bash
 
 # Print statistics when we exit
 trap exit 1 2 3 15
@@ -234,7 +234,7 @@ then
 		CONFIG="./${CONFIG}"
 	fi
 
-	source "${CONFIG}"
+	. "${CONFIG}"
 fi
 
 [ -d "${LOGDIR}" ] || mkdir ${LOGDIR} || exit 1
Signature · 7 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox