Re: Bug#291039: kernel-patch-debian-2.6.10: bashism in apply file
- To: Gerrit Pape <pape@dbnbgs.smarden.org>
- Cc: Debian kernel team <debian-kernel@lists.debian.org>, Kenshi Muto <kmuto@debian.org>, 291039@bugs.debian.org, Herbert Xu <herbert@gondor.apana.org.au>, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, 291107@bugs.debian.org, Roberto Suarez Soto <turgon@debian.org>
- Subject: Re: Bug#291039: kernel-patch-debian-2.6.10: bashism in apply file
- From: Horms <horms@debian.org>
- Date: Fri, 21 Jan 2005 12:31:29 +0900
- Message-id: <[🔎] 20050121033126.GI29477@verge.net.au>
- Mail-followup-to: Gerrit Pape <pape@dbnbgs.smarden.org>, Debian kernel team <debian-kernel@lists.debian.org>, Kenshi Muto <kmuto@debian.org>, 291039@bugs.debian.org, Herbert Xu <herbert@gondor.apana.org.au>, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, 291107@bugs.debian.org, Roberto Suarez Soto <turgon@debian.org>
- In-reply-to: <[🔎] 20050119170933.4809.qmail@07eea6b53bb09d.315fe32.mid.smarden.org>
- References: <[🔎] 20050118104838.25B3522308F@mail.topstudio.co.jp> <[🔎] 20050119071526.GA3567@verge.net.au> <[🔎] 20050119170933.4809.qmail@07eea6b53bb09d.315fe32.mid.smarden.org>
On Wed, Jan 19, 2005 at 05:11:23PM +0000, Gerrit Pape wrote:
> On Wed, Jan 19, 2005 at 04:15:26PM +0900, Horms wrote:
> > On Tue, Jan 18, 2005 at 07:48:38PM +0900, Kenshi Muto wrote:
> > > When I tried to build kernel 2.6.10 from debian source, I got
> > > following message.
> > >
> > > /usr/src/kernel-patches/all/2.6.10/apply/debian 2.6.10-3
> > > /usr/src/kernel-patches/all/2.6.10/apply/debian: 160: Syntax error: Missing '))'
> > >
> > > I'm using dash as sh. I think patch-code should use #!/bin/bash or
> > > be fixed for plain bourne shell.
>
> I agree that this may be a problem in dash. Anyway, there's a simple
> workaround, the only problem is this line
>
> for base in $((cd $home/series/ && ls -d *) | sort -rnt- -k 2); do
>
> and to make it the parser easier, simply put a space between the two '(':
>
> for base in $( (cd $home/series/ && ls -d *) | sort -rnt- -k 2); do
>
> With some good will you can read this from:
> http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
> ---
> If the command substitution consists of a single subshell, such as:
>
> $( (command) )
>
> a conforming application shall separate the "$(" and '(' into two tokens
> (that is, separate them with white space). This is required to avoid any
> ambiguities with arithmetic expansion.
> ---
Thanks for that clarification, I will make the relevant updates.
--
Horms
Reply to: