[OE-core] [PATCH 00/12] Remove invalid sed command
Christopher Larson
clarson at kergoth.com
Fri Jul 10 16:33:11 UTC 2015
On Fri, Jul 10, 2015 at 12:14 AM, Robert Yang <liezhi.yang at windriver.com>
wrote:
> The sed doesn't return false when miss match, I use a rough wrapper to
> find out the mis matches:
>
> 1) s/sed -i/mysed -i/ in the recipes
> $ find meta -name '*.bbclass' -o -name '*.bb' -o -name '*.inc' -exec sed
> -i 's/[[:space:]]sed -i/ mysed -i/g' {} \;
> 2) Add mysed to tmp/sysroots/x86_64-linux/usr/bin:
> #!/bin/sh
>
> for i in "$@"; do
> if [ -e "$i" ]; then
> cp "$i" "$i".sedbak
> /bin/sed "$@"
> num=`diff "$i" "$i".sedbak | wc -l`
> if [ $num -eq 0 ]; then
> echo "`pwd` XXX $@" >>/tmp/nothing_did_sed
> fi
> rm -f "$i".sedbak
> fi
> done
>
> 3) Check /tmp/nothing_did_sed one by one and fix them.
>
Nicely done.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150710/552c4403/attachment-0002.html>
More information about the Openembedded-core
mailing list