From 633b363c994bd542147cd6218e416de654fe9460 Mon Sep 17 00:00:00 2001
From: Clayton Craft <clayton@craftyguy.net>
Date: Mon, 9 Sep 2024 15:19:15 -0700
Subject: [PATCH] ci: lib: enable systemd if changed pkgs are in systemd repo

---
 .ci/lib/build_changed_aports.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.ci/lib/build_changed_aports.py b/.ci/lib/build_changed_aports.py
index ac7d56997c5..a5e6d9a6971 100755
--- a/.ci/lib/build_changed_aports.py
+++ b/.ci/lib/build_changed_aports.py
@@ -68,6 +68,7 @@ if __name__ == "__main__":
 
     # Filter out packages that can't be built for given arch
     # (Iterate over copy of packages, because we modify it in this loop)
+    systemd = False
     for package in packages.copy():
         apkbuild_path = pmb.helpers.pmaports.find(package)
         apkbuild = pmb.parse._apkbuild.apkbuild(pathlib.Path(apkbuild_path, "APKBUILD"))
@@ -76,6 +77,12 @@ if __name__ == "__main__":
             print(f"{package}: not enabled for {arch}, skipping")
             packages.remove(package)
 
+        if "extra-repos/systemd" in apkbuild_path:
+            systemd = True
+
+    if systemd:
+         common.run_pmbootstrap(["config", "systemd", "always"])
+
     # No packages: skip build
     if len(packages) == 0:
         print(f"no packages changed, which can be built for {arch}")
-- 
GitLab