[oe-commits] [openembedded-core] 98/102: kernel-yocto: test for empty artifacts

git at git.openembedded.org git at git.openembedded.org
Tue Aug 30 22:59:08 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit ee710cb880ab508830cf225f8fa2e64daf4fdc03
Author: Bruce Ashfield <bruce.ashfield at windriver.com>
AuthorDate: Tue Aug 30 12:49:05 2016 -0400

    kernel-yocto: test for empty artifacts
    
    With the updated kernel tools, we generate a list of sccs, patches,
    configs and BSP definitions as part of the meta data generation.
    
    It is valid if there aren't any of these artifacts found (i.e. you
    are just building a branch and a default config), but invoking the
    tools with no inputs isn't a good idea.
    
    To avoid this issue, we generate a string based on the artifacts
    and skip calling the tools if there's nothing to do.
    
    Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/kernel-yocto.bbclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 8650e55..9b8bab6 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -139,10 +139,16 @@ do_kernel_metadata() {
 	meta_dir=$(kgit --meta)
 
 	# run1: pull all the configuration fragments, no matter where they come from
-	scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+	elements="`echo -n ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}`"
+	if [ -n "${elements}" ]; then
+		scc --force -o ${S}/${meta_dir}:cfg,meta ${includes} ${bsp_definition} ${sccs} ${patches} ${KERNEL_FEATURES}
+	fi
 
 	# run2: only generate patches for elements that have been passed on the SRC_URI
-	scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
+	elements="`echo -n ${sccs} ${patches} ${KERNEL_FEATURES}`"
+	if [ -n "${elements}" ]; then
+		scc --force -o ${S}/${meta_dir}:patch --cmds patch ${includes} ${sccs} ${patches} ${KERNEL_FEATURES}
+	fi
 }
 
 do_patch() {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list