[OE-core] [PATCH 1/1] systemd: add bash to RDEPENDS

Anders Darander anders at chargestorm.se
Wed Nov 12 11:59:29 UTC 2014


* Chong Lu <Chong.Lu at windriver.com> [141027 10:24]:
> On 10/27/2014 04:59 PM, Anders Darander wrote:
> > * Chong Lu <Chong.Lu at windriver.com> [141027 08:19]:
> >> systemd-216+gitAUTOINC+5d0ae62c66: systemd-kernel-install requires /bin/bash,
> >> but no providers in its RDEPENDS [file-rdeps]
> > How much bashisms are it in the files in systemd-kernel-install?
> > Would it be possible to to patch the scripts to use standard posixh sh
> > instead of bash?

> It has lots of bashisms:

> $ checkbashisms ./usr/bin/kernel-install
> possible bashism in ./usr/bin/kernel-install line 32 (local -opt):
>      local -a files
> possible bashism in ./usr/bin/kernel-install line 35 (readarray):
>      readarray -t files < <(

This one, readarray, might require some thought on how to make it
standard posix sh compatible...

> possible bashism in ./usr/bin/kernel-install line 38 (alternative test 
> command ([[ foo ]] should be [ foo ])):
>                  if [[ -e "$i" ]]; then

There's quite a few of these, that are easy to patch and upstream.

> possible bashism in ./usr/bin/kernel-install line 58 (should be 'b = a'):
>      if [ "$i" == "--help" -o "$i" == "-h" ]; then

Dito for these.

> possible bashism in ./usr/bin/kernel-install line 113 ('((' should be 
> '$(('):
>                  ((ret+=$?))

Likely dito.

So in summary, a large number of bashisms in kernel-install are easy to
fix.

Then there's a few that's a lot harder, all of these are using arrays
and readarray.

It would have been nice to see such a summary instead of only the rather
long report. If we can find another way to implement the code using
arrays, the complete patch should be upstreamable.

I'm currently not using kernel-install in any system, thus, due to
workload, I'm not going to be able to look into this at the moment.

Cheers,
Anders
-- 
Anders Darander
ChargeStorm AB / eStorm AB



More information about the Openembedded-core mailing list