With the addition of bitbake-setup to the master branch, we can switch from using the combo-layer built poky repository to using bitbake-setup instead. This patch set changes the setup to use bitbake/oecore/meta-yocto/yocto-docs instead of poky. Most of the changes are due to the new layer layout, or using bitbake-setuip instead of scripts in helper. The existing scripts are still run for now to handle layers not in the core configuration json. We continue to write extra settings to auto.conf. This switches the code to use the distro/machine selection from fragments. We need to use init-build-env instead of oe-init-build-env in most cases. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1.9 KiB
Executable File
#!/usr/bin/env python3
Copyright Linux Foundation, Richard Purdie
SPDX-License-Identifier: GPL-2.0-only
Move the repositories into the correct layout and generate bblayers.conf
import os import sys import subprocess
import utils
parser = utils.ArgParser(description='Moves the repositories into the correct layout and generates bblayers.conf.')
parser.add_argument('abworkdir', help="The autobuilder working directory") parser.add_argument('target', help="The target to filter the repos to")
args = parser.parse_args()
ourconfig = utils.loadconfig()
def bitbakecmd(targetdir, cmd): subprocess.check_call(". ./init-build-env; %s" % cmd, shell=True, cwd=targetdir)
needrepos = utils.getconfigvar("NEEDREPOS", ourconfig, args.target, None)
repos = utils.getconfig("repo-defaults", ourconfig)
for repo in needrepos: repo_basename = repo.split('/')[0] if repo_basename in ['bitbake', 'oecore']: continue source = args.abworkdir + "/repos/" + repo_basename destination = args.abworkdir + "/" + repo_basename if not os.path.isdir(destination): utils.mkdir(destination) for f in os.listdir(source): subprocess.check_call(['mv', source + "/" + f, destination + "/"])
for repo in needrepos: repo_basename = repo.split('/')[0] if repo_basename in repos and "no-layer-add" in repos[repo_basename] and repos[repo_basename]["no-layer-add"]: continue nolayeradd = utils.getconfiglist("NOLAYERADD", ourconfig, args.target, None) if repo_basename in nolayeradd: continue try: bitbakecmd(args.abworkdir + "/build", "bitbake-layers add-layer %s" % (args.abworkdir + "/" + repo)) except subprocess.CalledProcessError as e: utils.printheader("ERROR: Command %s failed with exit code %d, see errors above." % (e.cmd, e.returncode)) sys.exit(e.returncode)