diff mbox series

[yocto-autobuilder-helper] config.json/scripts: Add a specific list of repos to ignore and reference everywhere

Message ID 20260930105219.544597-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series [yocto-autobuilder-helper] config.json/scripts: Add a specific list of repos to ignore and reference everywhere | expand

Commit Message

Richard Purdie Sept. 30, 2026, 10:52 a.m. UTC
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 <richard.purdie@linuxfoundation.org>
---
 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(-)
diff mbox series

Patch

diff --git a/config.json b/config.json
index 17c241e..b96a4bd 100644
--- a/config.json
+++ b/config.json
@@ -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" : "yocto@lists.yoctoproject.org",
     "QAMAIL_CC" : "qa-build-notification@lists.yoctoproject.org",
diff --git a/scripts/getproperties.py b/scripts/getproperties.py
index 90339e8..0bafa57 100755
--- a/scripts/getproperties.py
+++ b/scripts/getproperties.py
@@ -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()
diff --git a/scripts/prepare-shared-repos b/scripts/prepare-shared-repos
index 8ffc2c5..a676669 100755
--- a/scripts/prepare-shared-repos
+++ b/scripts/prepare-shared-repos
@@ -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.
diff --git a/scripts/send_qa_email.py b/scripts/send_qa_email.py
index 07fc1e7..6ce9c46 100755
--- a/scripts/send_qa_email.py
+++ b/scripts/send_qa_email.py
@@ -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/"
diff --git a/scripts/shared-repo-unpack b/scripts/shared-repo-unpack
index d1089cc..53a89ff 100755
--- a/scripts/shared-repo-unpack
+++ b/scripts/shared-repo-unpack
@@ -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]
diff --git a/scripts/utils.py b/scripts/utils.py
index ab33734..fee8f67 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -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):