From: "Andrey Zhizhikin" <andrey.z@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Andrey Zhizhikin <andrey.z@gmail.com>,
Bruce Ashfield <bruce.ashfield@gmail.com>
Subject: [PATCH] kernel/yocto: fix search for defconfig from src_uri
Date: Wed, 1 Jul 2020 10:46:28 +0000 [thread overview]
Message-ID: <20200701104628.32696-1-andrey.z@gmail.com> (raw)
Fetcher provides full paths to defconfig and scc files, which awk
comparison operator does not catch during construction of
src_uri_defconfig and sccs_from_src_uri lists. This causes the
src_uri_defconfig variable to come out empty, and fails further
validation if defconfig is only supplied via SRC_URI.
Replace comparison operator with awk index function which searches for
sub-string during filtering, effectively placing defconfig from SRC_URI
into src_uri_defconfig and scc files in sccs_from_src_uri respectively.
Fixes: 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
meta/classes/kernel-yocto.bbclass | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 41d8620e67..059d78b7dc 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -156,9 +156,10 @@ do_kernel_metadata() {
# a quick check to make sure we don't have duplicate defconfigs If
# there's a defconfig in the SRC_URI, did we also have one from the
# KBUILD_DEFCONFIG processing above ?
- src_uri_defconfig=$(echo $sccs_from_src_uri | awk '{ if ($0=="defconfig") { print $0 } }' RS=' ')
+ src_uri_defconfig=$(echo $sccs_from_src_uri | awk '(index($0, "defconfig") != 0) { print $0 }' RS=' ')
# drop and defconfig's from the src_uri variable, we captured it just above here if it existed
- sccs_from_src_uri=$(echo $sccs_from_src_uri | awk '{ if ($0!="defconfig") { print $0 } }' RS=' ')
+ sccs_from_src_uri=$(echo $sccs_from_src_uri | awk '(index($0, "defconfig") == 0) { print $0 }' RS=' ')
+
if [ -n "$in_tree_defconfig" ]; then
sccs_defconfig=$in_tree_defconfig
if [ -n "$src_uri_defconfig" ]; then
--
2.17.1
next reply other threads:[~2020-07-01 10:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 10:46 Andrey Zhizhikin [this message]
2020-07-01 12:58 ` [PATCH] kernel/yocto: fix search for defconfig from src_uri Bruce Ashfield
2020-07-01 13:01 ` Bruce Ashfield
[not found] ` <161DA278CF8B94DF.27211@lists.openembedded.org>
2020-07-01 13:26 ` [OE-core] " Bruce Ashfield
2020-07-01 13:32 ` Bruce Ashfield
2020-07-01 14:47 ` Andrey Zhizhikin
[not found] ` <161DA84312E53E76.3055@lists.openembedded.org>
2020-07-01 15:00 ` Andrey Zhizhikin
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=20200701104628.32696-1-andrey.z@gmail.com \
--to=andrey.z@gmail.com \
--cc=bruce.ashfield@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox