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", "branch" : "master",
"revision" : "HEAD", "revision" : "HEAD",
"checkout-dirname" : ".", "checkout-dirname" : ".",
"no-layer-add" : true "no-layer-add" : true,
"call-init" : true
}, },
"meta-intel" : { "meta-intel" : {
"url" : "git://git.yoctoproject.org/meta-intel", "url" : "git://git.yoctoproject.org/meta-intel",
@ -697,7 +698,8 @@
"branch" : "master", "branch" : "master",
"revision" : "HEAD", "revision" : "HEAD",
"checkout-dirname" : ".", "checkout-dirname" : ".",
"no-layer-add" : true "no-layer-add" : true,
"call-init" : true
}, },
"bitbake" : { "bitbake" : {
"url" : "git://git.openembedded.org/bitbake", "url" : "git://git.openembedded.org/bitbake",

View File

@ -31,14 +31,20 @@ def bitbakecmd(targetbuilddir, cmd):
needrepos = utils.getconfigvar("NEEDREPOS", ourconfig, target, None) needrepos = utils.getconfigvar("NEEDREPOS", ourconfig, target, None)
callinit = False
for repo in needrepos: for repo in needrepos:
checkdir = repo checkdir = repo
if repo in ourconfig["repo-defaults"] and "checkout-dirname" in ourconfig["repo-defaults"][repo]: 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"] checkdir = ourconfig["repo-defaults"][repo]["checkout-dirname"]
utils.mkdir(targetbuilddir + "/" + checkdir) utils.mkdir(targetbuilddir + "/" + checkdir)
for f in os.listdir(targetdir + "/repos/" + repo): for f in os.listdir(targetdir + "/repos/" + repo):
subprocess.check_call(['mv', targetdir + "/repos/" + repo + "/" + f, targetbuilddir + "/" + checkdir + "/"]) subprocess.check_call(['mv', targetdir + "/repos/" + repo + "/" + f, targetbuilddir + "/" + checkdir + "/"])
if callinit:
subprocess.check_call(". ./oe-init-build-env", shell=True, cwd=targetbuilddir) subprocess.check_call(". ./oe-init-build-env", shell=True, cwd=targetbuilddir)
for repo in needrepos: for repo in needrepos: