From 943395f925732b65c09a79c00f48bb1a8b62b54b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 30 Jan 2018 14:13:22 +0000 Subject: [PATCH] layer-config: Add configuration for calling the init scripts (fixes eclipse build) Signed-off-by: Richard Purdie --- config.json | 6 ++++-- scripts/layer-config | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index 384bc87..77fb1a7 100644 --- a/config.json +++ b/config.json @@ -686,7 +686,8 @@ "branch" : "master", "revision" : "HEAD", "checkout-dirname" : ".", - "no-layer-add" : true + "no-layer-add" : true, + "call-init" : true }, "meta-intel" : { "url" : "git://git.yoctoproject.org/meta-intel", @@ -697,7 +698,8 @@ "branch" : "master", "revision" : "HEAD", "checkout-dirname" : ".", - "no-layer-add" : true + "no-layer-add" : true, + "call-init" : true }, "bitbake" : { "url" : "git://git.openembedded.org/bitbake", diff --git a/scripts/layer-config b/scripts/layer-config index c4d3c55..c76b9d0 100755 --- a/scripts/layer-config +++ b/scripts/layer-config @@ -31,15 +31,21 @@ def bitbakecmd(targetbuilddir, cmd): needrepos = utils.getconfigvar("NEEDREPOS", ourconfig, target, None) +callinit = False + for repo in needrepos: checkdir = repo - if repo in ourconfig["repo-defaults"] and "checkout-dirname" in ourconfig["repo-defaults"][repo]: - checkdir = ourconfig["repo-defaults"][repo]["checkout-dirname"] + if repo in ourconfig["repo-defaults"]: + if "call-init" in ourconfig["repo-defaults"][repo] and ourconfig["repo-defaults"][repo]["call-init"]: + callinit = True + if "checkout-dirname" in ourconfig["repo-defaults"][repo]: + checkdir = ourconfig["repo-defaults"][repo]["checkout-dirname"] utils.mkdir(targetbuilddir + "/" + checkdir) for f in os.listdir(targetdir + "/repos/" + repo): subprocess.check_call(['mv', targetdir + "/repos/" + repo + "/" + f, targetbuilddir + "/" + checkdir + "/"]) -subprocess.check_call(". ./oe-init-build-env", shell=True, cwd=targetbuilddir) +if callinit: + subprocess.check_call(". ./oe-init-build-env", shell=True, cwd=targetbuilddir) for repo in needrepos: if repo in ourconfig["repo-defaults"] and "no-layer-add" in ourconfig["repo-defaults"][repo] and ourconfig["repo-defaults"][repo]["no-layer-add"]: