* MAKEALL problem
@ 2011-04-29 7:06 Belisko Marek
2011-04-29 8:25 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 9+ messages in thread
From: Belisko Marek @ 2011-04-29 7:06 UTC (permalink / raw)
To: barebox
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
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 7:06 MAKEALL problem Belisko Marek
@ 2011-04-29 8:25 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 8:47 ` Belisko Marek
0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-29 8:25 UTC (permalink / raw)
To: Belisko Marek; +Cc: barebox
On 09:06 Fri 29 Apr , Belisko Marek wrote:
> 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?
no I use it evreyday on barebox or linux
which shell are you using
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 8:25 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-29 8:47 ` Belisko Marek
2011-04-29 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 9+ messages in thread
From: Belisko Marek @ 2011-04-29 8:47 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
HI,
On Fri, Apr 29, 2011 at 10:25 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 09:06 Fri 29 Apr , Belisko Marek wrote:
>> 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?
> no I use it evreyday on barebox or linux
>
> which shell are you using
GNOME Terminal 2.32.1
>
> Best Regards,
> J.
>
regards,
marek
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 8:47 ` Belisko Marek
@ 2011-04-29 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 9:42 ` Belisko Marek
2011-04-29 18:38 ` Belisko Marek
0 siblings, 2 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-29 9:30 UTC (permalink / raw)
To: Belisko Marek; +Cc: barebox
On 10:47 Fri 29 Apr , Belisko Marek wrote:
> HI,
>
> On Fri, Apr 29, 2011 at 10:25 AM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > On 09:06 Fri 29 Apr , Belisko Marek wrote:
> >> 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?
> > 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-29 9:42 ` Belisko Marek
2011-04-29 18:38 ` Belisko Marek
1 sibling, 0 replies; 9+ messages in thread
From: Belisko Marek @ 2011-04-29 9:42 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Fri, Apr 29, 2011 at 11:30 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 10:47 Fri 29 Apr , Belisko Marek wrote:
>> HI,
>>
>> On Fri, Apr 29, 2011 at 10:25 AM, Jean-Christophe PLAGNIOL-VILLARD
>> <plagnioj@jcrosoft.com> wrote:
>> > On 09:06 Fri 29 Apr , Belisko Marek wrote:
>> >> 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?
>> > 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
>
> Best Regards,
> J.
>
regards,
marek
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 9:42 ` Belisko Marek
@ 2011-04-29 18:38 ` Belisko Marek
2011-05-02 9:27 ` Uwe Kleine-König
1 sibling, 1 reply; 9+ messages in thread
From: Belisko Marek @ 2011-04-29 18:38 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Fri, Apr 29, 2011 at 11:30 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 10:47 Fri 29 Apr , Belisko Marek wrote:
>> HI,
>>
>> On Fri, Apr 29, 2011 at 10:25 AM, Jean-Christophe PLAGNIOL-VILLARD
>> <plagnioj@jcrosoft.com> wrote:
>> > On 09:06 Fri 29 Apr , Belisko Marek wrote:
>> >> 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?
>> > 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.
diff --git a/MAKEALL b/MAKEALL
index e987de2..6c0d017 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -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
>
> Best Regards,
> J.
>
regards,
marek
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
2011-04-29 18:38 ` Belisko Marek
@ 2011-05-02 9:27 ` Uwe Kleine-König
[not found] ` <BANLkTinr-veuyxksGrtbk3o49-Pcc1uY-g@mail.gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2011-05-02 9:27 UTC (permalink / raw)
To: Belisko Marek; +Cc: barebox
Hello,
On Fri, Apr 29, 2011 at 08:38:33PM +0200, Belisko Marek wrote:
> On Fri, Apr 29, 2011 at 11:30 AM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > On 10:47 Fri 29 Apr , Belisko Marek wrote:
> >> HI,
> >>
> >> On Fri, Apr 29, 2011 at 10:25 AM, Jean-Christophe PLAGNIOL-VILLARD
> >> <plagnioj@jcrosoft.com> wrote:
> >> > On 09:06 Fri 29 Apr , Belisko Marek wrote:
> >> >> 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?
> >> > 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.
>
> diff --git a/MAKEALL b/MAKEALL
> index e987de2..6c0d017 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -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
Maybe instead use
-#!/bin/sh
+#!/bin/bash
? (I'd fix s/source/./ anyhow.)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: MAKEALL problem
[not found] ` <BANLkTinr-veuyxksGrtbk3o49-Pcc1uY-g@mail.gmail.com>
@ 2011-05-02 9:41 ` Uwe Kleine-König
2011-05-02 9:50 ` [PATCH] Make MAKEALL a bash script Uwe Kleine-König
0 siblings, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2011-05-02 9:41 UTC (permalink / raw)
To: Belisko Marek; +Cc: barebox
Hello,
On Mon, May 02, 2011 at 11:33:37AM +0200, Belisko Marek wrote:
> 2011/5/2 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> >
> > Maybe instead use
> >
> > -#!/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
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] Make MAKEALL a bash script
2011-05-02 9:41 ` Uwe Kleine-König
@ 2011-05-02 9:50 ` Uwe Kleine-König
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-05-02 9:50 UTC (permalink / raw)
To: Belisko Marek; +Cc: barebox
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.
Reported-by: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
On Mon, May 02, 2011 at 11:41:01AM +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Mon, May 02, 2011 at 11:33:37AM +0200, Belisko Marek wrote:
> > 2011/5/2 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > >
> > > Maybe instead use
> > >
> > > -#!/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
diff --git a/MAKEALL b/MAKEALL
index e987de2..2de5700 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -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
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-05-02 9:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-29 7:06 MAKEALL problem Belisko Marek
2011-04-29 8:25 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 8:47 ` Belisko Marek
2011-04-29 9:30 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-29 9:42 ` Belisko Marek
2011-04-29 18:38 ` Belisko Marek
2011-05-02 9:27 ` Uwe Kleine-König
[not found] ` <BANLkTinr-veuyxksGrtbk3o49-Pcc1uY-g@mail.gmail.com>
2011-05-02 9:41 ` Uwe Kleine-König
2011-05-02 9:50 ` [PATCH] Make MAKEALL a bash script Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox