[OE-core] [PATCH] bash2dash conversion
He Zhe
zhe.he at windriver.com
Thu Sep 22 08:20:36 UTC 2016
On 09/19/2016 08:07 PM, Burton, Ross wrote:
>
> On 19 September 2016 at 12:57, Peter Kjellerstedt <peter.kjellerstedt at axis.com <mailto:peter.kjellerstedt at axis.com>>wrote:
>
> > ++ mem_exists="`grep "^$groupname:[!:]*:[!:]*:\([!,]*,\)*$username\(,[!,]*\)*"$rootdir/etc/group || true`"
> > if test "x$mem_exists" = "x"; then
> > bbfatal "${PN}: groupmems command did not succeed."
> > fi
>
> The above change cannot be correct. Changing the expression "[^:]"
> (which means "anything but :") to "[!:]" (which means "! or :") is
> definitely not the same....
>
>
> My prediction is that this series is generated by running checkbashism over the fragments, it fires a false-positive here (from memory because it thinks it is processing a bash glob or something, not grep regex).
>
> Note that I just submitted my verify-bashism script which has a whitelist for things - such as use of command - which whilst not in POSIX are in fact in bash/dash/ash so for all intents and purposes will work.
>
Yes, I'm using checkbashism and have found some false-positive reports but missed this one. Thank you for pointing out.
Zhe
> Ross
More information about the Openembedded-core
mailing list