Skip to content
Snippets Groups Projects
Verified Commit 970bc34c authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

ci/check_changed_aports_ver: add tests for new dev pkg rules (MR 4994)

[ci:ignore-count]

[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
parent 40a46fd4
No related branches found
No related tags found
No related merge requests found
Pipeline #205207 passed
......@@ -123,6 +123,33 @@ def check_versions(args, packages):
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
error = True
# Additional checks for device packages
if package.startswith('device-'):
head_parsed = get_package_contents(args, package, "HEAD", False)
upstream_parsed = get_package_contents(args, package, commit, False)
# checksums did not change
if head_parsed["sha512sums"] == upstream_parsed["sha512sums"]:
# Check that pkgver did not change
if head_parsed["pkgver"] != upstream_parsed["pkgver"]:
print(f" - {package}: pkgver should not change when package source checksums did not change."
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
error = True
# We do not check for a bumped pkgrel, because not everything
# needs it, e.g: pmb_recommends
# checksums changed
else:
# Check that pkgrel was reset to 0
if head_parsed["pkgrel"] != 0:
print(f" - {package}: pkgrel should be 0 when package source checksums change."
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
error = True
# Check that pkgver was changed
if head_parsed["pkgver"] == upstream_parsed["pkgver"]:
print(f" - {package}: pkgver should change when package source checksums change."
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
error = True
# Compare head and upstream versions
result = pmb.parse.version.compare(head, upstream)
if result != 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment