kernel/yocto: fix search for defconfig from src_uri
PATCH v2 1/1 kernel/yocto: fix search for defconfig from src_uri
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 match 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.
--- meta/classes/kernel-yocto.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/classes/kernel-yocto.bbclass +3 -2
@@ -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 '(match($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 '(match($0, "defconfig") == 0) { print $0 }' RS=' ') + if [ -n "$in_tree_defconfig" ]; then sccs_defconfig=$in_tree_defconfig if [ -n "$src_uri_defconfig" ]; then
Signature · 1 line
2.17.1
Quoted 7 lines · Andrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of
src_uri_defconfigandsccs_from_src_urilists. This causes thesrc_uri_defconfigvariable to come out empty, and fails further validation if defconfig is only supplied viaSRC_URI.
Quoted 5 lines
Replace comparison operator with awk match function which searches for sub-string during filtering, effectively placing defconfig from
SRC_URIintosrc_uri_defconfigand scc files insccs_from_src_urirespectively.Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)
v2 passes my testing as well. The autobuilder gets the final say, but I can't see this causing any issues.
Quoted 26 lines
Cc Bruce Ashfield <[email protected]>Signed-off-by Andrey Zhizhikin <[email protected]>--- meta/classes/kernel-yocto.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)meta/classes/kernel-yocto.bbclass +3
-3@@ -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 '(match($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 '(match($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
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 13 lines · Bruce Ashfield via lists.openembedded.org
Quoted 11 lines · Andrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of
src_uri_defconfigandsccs_from_src_urilists. This causes thesrc_uri_defconfigvariable to come out empty, and fails further validation if defconfig is only supplied viaSRC_URI.Replace comparison operator with awk match function which searches for sub-string during filtering, effectively placing defconfig from
SRC_URIintosrc_uri_defconfigand scc files insccs_from_src_urirespectively.
Quoted 6 lines
Quoted 1 line
Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs are processed first)v2 passes my testing as well. The autobuilder gets the final say, but I can't see this causing any issues.
Richard,
I didn't see this on master-next, and we got a different patch for this on the list .. this is the preferred fix for readabilty.
I just wanted to make sure you weren't waiting for me to send it in my next pull request. I can absolutely do that if you want.
Cheers,
Bruce
Quoted 35 lines
Acked-by Bruce Ashfield <[email protected]>Quoted 24 lines
Cc Bruce Ashfield <[email protected]>Signed-off-by Andrey Zhizhikin <[email protected]>--- meta/classes/kernel-yocto.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)meta/classes/kernel-yocto.bbclass +3
-3@@ -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 '(match($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 '(match($0, "defconfig") == 0) { print $0 }' RS=' ') + if [ -n "$in_tree_defconfig" ]; then sccs_defconfig=$in_tree_defconfig if [ -n "$src_uri_defconfig" ]; then --Quoted 2 lines
2.17.1
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 26 lines · Bruce Ashfield
Quoted 15 lines · Bruce Ashfield via lists.openembedded.org
Quoted 13 lines · Andrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of
src_uri_defconfigandsccs_from_src_urilists. This causes thesrc_uri_defconfigvariable to come out empty, and fails further validation if defconfig is only supplied viaSRC_URI.Replace comparison operator with awk match function which searches for
sub-string during filtering, effectively placing defconfig fromSRC_URI
intosrc_uri_defconfigand scc files insccs_from_src_urirespectively.Quoted 7 lines
Quoted 2 lines
Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs areprocessed first)
v2 passes my testing as well. The autobuilder gets the final say, but
I can't see this causing any issues.
Quoted 8 lines
Richard,
I didn't see this on master-next, and we got a different patch for this on the list .. this is the preferred fix for readabilty.
I just wanted to make sure you weren't waiting for me to send it in my
next pull request. I can absolutely do that if you want.
I was waiting for some indication on your thoughts, I'll queue it :)
Cheers,
Richard
Quoted 30 lines · Richard Purdie
Quoted 28 lines · Bruce Ashfield
Quoted 15 lines · Bruce Ashfield via lists.openembedded.org
Quoted 13 lines · Andrey Zhizhikin
Fetcher provides full paths to defconfig and scc files, which awk comparison operator does not catch during construction of
src_uri_defconfigandsccs_from_src_urilists. This causes thesrc_uri_defconfigvariable to come out empty, and fails further validation if defconfig is only supplied viaSRC_URI.Replace comparison operator with awk match function which searches for
sub-string during filtering, effectively placing defconfig fromSRC_URI
intosrc_uri_defconfigand scc files insccs_from_src_urirespectively.Quoted 7 lines
Quoted 2 lines
Fixes 23dcff0d396c (kernel/yocto: ensure that defconfigs areprocessed first)
v2 passes my testing as well. The autobuilder gets the final say, but
I can't see this causing any issues.Richard,
Quoted 8 lines
Quoted 6 lines
I didn't see this on master-next, and we got a different patch for this on the list .. this is the preferred fix for readabilty.
I just wanted to make sure you weren't waiting for me to send it in my
next pull request. I can absolutely do that if you want.I was waiting for some indication on your thoughts, I'll queue it :)
cool. I do appreciate that .. I realized you probably were waiting when I wasn't super clear on my last reply.
It isn't that it was urgent, I just wanted to make sure I hadn't dropped the ball on it.
Bruce
Quoted 5 lines
Cheers,
Richard
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II