ci: remove unused args argument from pmb.parse.apkbuild (MR 2711)

This commit is contained in:
bo41 2021-11-27 15:08:36 +01:00 committed by Newbyte
parent f68ebfe7b8
commit 03c989ed54
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
8 changed files with 9 additions and 10 deletions

View file

@ -67,8 +67,7 @@ if __name__ == "__main__":
# (Iterate over copy of packages, because we modify it in this loop)
for package in packages.copy():
apkbuild_path = pmb.helpers.pmaports.find(args, package)
apkbuild = pmb.parse._apkbuild.apkbuild(args,
f"{apkbuild_path}/APKBUILD")
apkbuild = pmb.parse._apkbuild.apkbuild(f"{apkbuild_path}/APKBUILD")
if not pmb.helpers.pmaports.check_arches(apkbuild["arch"], arch):
print(f"{package}: not enabled for {arch}, skipping")

View file

@ -38,7 +38,7 @@ def get_package_version(args, package, revision, check=True):
with tempfile.TemporaryDirectory() as tempdir:
with open(tempdir + "/APKBUILD", "w", encoding="utf-8") as handle:
handle.write(apkbuild_content)
parsed = pmb.parse.apkbuild(args, tempdir + "/APKBUILD", False, False)
parsed = pmb.parse.apkbuild(tempdir + "/APKBUILD", False, False)
return parsed["pkgver"] + "-r" + parsed["pkgrel"]

View file

@ -37,7 +37,7 @@ def test_aports_device(args):
Various tests performed on the /device/*/device-* aports.
"""
for path in glob.iglob(args.aports + "/device/*/device-*/APKBUILD"):
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
# Depends: Require "postmarketos-base"
if "postmarketos-base" not in apkbuild["depends"]:
@ -76,7 +76,7 @@ def test_aports_device_kernel(args):
# Iterate over device aports
for path in glob.glob(args.aports + "/device/*/device-*/APKBUILD"):
# Parse apkbuild and kernels from subpackages
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
device = apkbuild["pkgname"][len("device-"):]
kernels_subpackages = pmb.parse._apkbuild.kernels(args, device)

View file

@ -27,7 +27,7 @@ def test_aports_firmware(args):
]
for path in glob.iglob(f"{args.aports}/**/firmware-*/APKBUILD", recursive=True):
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
aport_name = os.path.basename(os.path.dirname(path))
if aport_name not in excluded:

View file

@ -30,7 +30,7 @@ def get_categorized_packages(args):
for path in glob.glob(args.aports + "/*/*/APKBUILD"):
# Parse APKBUILD
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
url = apkbuild["url"]
pkgname = apkbuild["pkgname"]
pkgver = apkbuild["pkgver"]

View file

@ -17,7 +17,7 @@ def test_aports_kernel(args):
"""
for path in glob.iglob(f"{args.aports}/**/linux-*/APKBUILD", recursive=True):
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
aport_name = os.path.basename(os.path.dirname(path))
if "pmb:cross-native" not in apkbuild["options"]:

View file

@ -17,7 +17,7 @@ def test_aports_ui(args):
"""
for arch in pmb.config.build_device_architectures:
for path in glob.iglob(args.aports + "/main/postmarketos-ui-*/APKBUILD"):
apkbuild = pmb.parse.apkbuild(args, path)
apkbuild = pmb.parse.apkbuild(path)
# Skip if arch isn't enabled
if not pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch, False):
continue

View file

@ -63,7 +63,7 @@ def test_aports_unreferenced_files(args):
Raise an error if an unreferenced file is found
"""
for apkbuild_path in glob.iglob(args.aports + "/**/APKBUILD", recursive=True):
apkbuild = pmb.parse.apkbuild(args, apkbuild_path)
apkbuild = pmb.parse.apkbuild(apkbuild_path)
sources_chk = parse_source_from_checksums(args, apkbuild_path)
# Collect install files from subpackages