ci: unreferenced: handle triggers from subpackages (MR 3386)

Depends: pmbootstrap MR 2202
This commit is contained in:
Oliver Smith 2022-09-11 13:44:56 +02:00
parent b01974179c
commit 4cd4463a21
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -66,18 +66,22 @@ def test_aports_unreferenced_files(args):
apkbuild = pmb.parse.apkbuild(apkbuild_path)
sources_chk = parse_source_from_checksums(args, apkbuild_path)
# Collect install files from subpackages
# Collect files from subpackages
subpackage_installs = []
subpackage_triggers = []
if apkbuild["subpackages"]:
for subpackage in apkbuild["subpackages"].values():
if not subpackage:
continue
subpackage_installs += subpackage.get("install", [])
subpackage_triggers += subpackage.get("triggers", [])
print(subpackage_installs)
if "device-nokia-n900-nonfree-firmware.post-install" in subpackage_installs:
print(subpackage)
# Collect trigger files
trigger_sources = []
if apkbuild["triggers"]:
for trigger in apkbuild["triggers"]:
for trigger in apkbuild["triggers"] + subpackage_triggers:
trigger_sources.append(trigger.split("=")[0])
dirname = os.path.dirname(apkbuild_path)