From: Chong Lu <Chong.Lu@windriver.com>
To: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] systemd: add bash to RDEPENDS
Date: Mon, 24 Nov 2014 16:50:05 +0800 [thread overview]
Message-ID: <5472F13D.3070302@windriver.com> (raw)
In-Reply-To: <20141112115929.GA13790@ad.chargestorm.se>
On 11/12/2014 07:59 PM, Anders Darander wrote:
> * Chong Lu <Chong.Lu@windriver.com> [141027 10:24]:
>> On 10/27/2014 04:59 PM, Anders Darander wrote:
>>> * Chong Lu <Chong.Lu@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
next prev parent reply other threads:[~2014-11-24 8:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 7:16 [PATCH 0/1] systemd: add bash to RDEPENDS Chong Lu
2014-10-27 7:16 ` [PATCH 1/1] " Chong Lu
2014-10-27 8:59 ` Anders Darander
2014-10-27 9:24 ` Chong Lu
2014-11-12 11:59 ` Anders Darander
2014-11-24 8:50 ` Chong Lu [this message]
2014-11-11 2:17 ` Chong Lu
2014-11-12 10:28 ` Koen Kooi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5472F13D.3070302@windriver.com \
--to=chong.lu@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.