config.json/scripts: Add a specific list of repos to ignore and reference everywhere
PATCH 1/1 config.json/scripts: Add a specific list of repos to ignore and reference everywhere
There are a set of repos we need to ignore in builds, poky, meta-gplv2 and more. Put these in a specific list in the config and update the shared functions to remove them in all places rather than the current inconsistency.
Signed-off-by Richard Purdie <[email protected]>
--- config.json | 1 + scripts/getproperties.py | 3 ++- scripts/prepare-shared-repos | 6 +++--- scripts/send_qa_email.py | 5 +---- scripts/shared-repo-unpack | 2 +- scripts/utils.py | 10 +++++----- 6 files changed, 13 insertions(+), 14 deletions(-)
config.json +1 -0
@@ -16,6 +16,7 @@ "REPO_STASH_DIR" : "${BASE_HOMEDIR}/git/mirror", "TRASH_DIR" : "${BASE_HOMEDIR}/git/trash", + "IGNORE_REPOS" : ["poky", "meta-gplv2", "mixin-wrynose-linux-firmware"], "QAMAIL_TO" : "[email protected]", "QAMAIL_CC" : "[email protected]",
scripts/getproperties.py +2 -1
@@ -15,7 +15,8 @@ targetname = sys.argv[2] if len(sys.argv) > 2 else None with open(builddir + "/../layerinfo.json") as f: repos = json.load(f) -utils.filterrepojson(repos) +ourconfig = utils.loadconfig() +utils.filterrepojson(ourconfig, repos) def get_revision(repopath): return subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=repopath).decode('utf-8').strip()
scripts/prepare-shared-repos +3 -3
@@ -39,14 +39,14 @@ ourconfig = utils.loadconfig() with open(args.repojson) as f: repos = json.load(f) -utils.filterrepojson(repos) +utils.filterrepojson(ourconfig, repos) stashdir = utils.getconfig("REPO_STASH_DIR", ourconfig) +ignore_repos = utils.getconfig("IGNORE_REPOS", ourconfig) with tempfile.TemporaryDirectory(prefix="shared-repo-temp-", dir="/home/pokybuild/tmp") as tempdir: for repo in sorted(repos.keys()): - # gplv2 is no longer built/tested in master - if repo == "meta-gplv2": + if repo in ignore_repos: continue utils.printheader("Initially fetching repo %s" % repo) # shallow clones disabled as it doesn't work correctly with revision numbers in the result repo leading to release build failures.
scripts/send_qa_email.py +1 -4
@@ -148,7 +148,7 @@ def send_qa_email(): with open(args.repojson) as f: repos = json.load(f) - utils.filterrepojson(repos) + utils.filterrepojson(ourconfig, repos) oecorerepodir = os.path.dirname(args.repojson) + "/build/layers/openembedded-core" resulttool = oecorerepodir + "/scripts/resulttool"
@@ -260,9 +260,6 @@ def send_qa_email(): layersdir = os.path.dirname(args.repojson) + "/build/layers/" buildhashes = "" for repo in sorted(repos.keys()): - # gplv2 is no longer built/tested in master - if repo == "meta-gplv2": - continue layerdir = layersdir + repo + "/" if repo == "oecore": layerdir = layersdir + "openembedded-core/"
scripts/shared-repo-unpack +1 -1
@@ -52,7 +52,7 @@ bbsetup_json = args.repojson.replace("layerinfo.json", "bbsetup-overrides.json") with open(layerjson) as f: repos = json.load(f) -utils.filterrepojson(repos, args.target) +utils.filterrepojson(ourconfig, repos, args.target) targetsubdir = args.abworkdir + "/repos" needrepos_baseddirs = [r.split('/')[0] for r in needrepos]
scripts/utils.py +5 -5
@@ -314,11 +314,11 @@ def publishrepo(clonedir, repo, publishdir): subprocess.check_call("rsync -av " + archive_name + "* " + publishdir, shell=True, cwd=sharedrepo) # The repo json needs to be filtered for builds with bitbake-setup -def filterrepojson(data, target=None): - if "poky" in data: - del data["poky"] - if "meta-gplv2" in data: - del data["meta-gplv2"] +def filterrepojson(ourconfig, data, target=None): + ignore_repos = utils.getconfig("IGNORE_REPOS", ourconfig) + for repo in ignore_repos: + if repo in data: + del data[repo] return def mkdir(path):