On 11/12/2014 07:59 PM, Anders Darander wrote:
* Chong Lu <chong...@windriver.com> [141027 10:24]:
On 10/27/2014 04:59 PM, Anders Darander wrote:
* Chong Lu <chong...@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.

Yes, some bashisms about array in kernel-install and 90-loaderentry.install script. But it is painful to fix them. The systemd-kernel-install is a sub package and it isn't installed by default. It doesn't impact image size when we add bash dependency to systemd-kernel-install. If you don't agree add bash dependency, we just get a warning about file-rdeps.

Best Regards
Chong


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

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to