]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-yocto: only replace leading -I in include paths
authorYanfei Xu <yanfei.xu@windriver.com>
Wed, 2 Sep 2020 14:33:04 +0000 (10:33 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Sep 2020 08:43:59 +0000 (09:43 +0100)
We just want to remove the first '-I' in $d, hence removing the
g' of sed avoid changing the real path which is include '-I'

We also add an anchor to the regex to only match -I at the start
of the path.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass

index 092afe251de3fe87eece725503b1ff16562d0e4c..a35c5923df25e1e6e330275b0c7ea53b5118329f 100644 (file)
@@ -241,7 +241,7 @@ do_kernel_metadata() {
                for feature in ${KERNEL_FEATURES}; do
                        feature_found=f
                        for d in $includes; do
-                               path_to_check=$(echo $d | sed 's/-I//g')
+                               path_to_check=$(echo $d | sed 's/^-I//')
                                if [ "$feature_found" = "f" ] && [ -e "$path_to_check/$feature" ]; then
                                    feature_found=t
                                fi