layer-config: Add configuration for calling the init scripts (fixes eclipse build)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2018-01-30 14:13:22 +00:00
parent 82985d44a7
commit 943395f925
2 changed files with 13 additions and 5 deletions

View File

@ -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",

View File

@ -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"]: