ci: relax pkgrel changes for packages that don’t have remote sources

Motivation is to avoid unnecessary overhead for MR authors & no reason to
actually use pkgrel for meta-packages.

So instead, recommend pkgver-bumps & pkgrel=0 for metapackages, but don't
block MRs when they bumped the "wrong" one. Just make everyone's life easier.

Discussed at <https://docs.postmarketos.org/policies-and-processes/governance/team-meetings/meeting-notes.html> (2026-03-16)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8302>
This commit is contained in:
Achill Gilgenast
2026-04-10 12:08:26 +00:00
parent 90aeb1d4de
commit e38532b7f7
2 changed files with 16 additions and 22 deletions
+6 -22
View File
@@ -137,7 +137,7 @@ def check_versions(packages):
pkgver = head.rpartition('-r')[0]
if package.startswith('device-') and not pkgver.isdigit():
print(f" - {package}: invalid pkgver \"{pkgver}\""
"See: https://wiki.postmarketos.org/wiki/Packaging#device_packages_and_other_packages_without_sources")
"See: https://docs.postmarketos.org/pmaports/main/packaging-guidelines.html#package-versioning-pkgver-pkgrel")
error = True
# Additional checks for device packages
@@ -145,27 +145,11 @@ def check_versions(packages):
head_parsed = get_package_contents(package, "HEAD", False)
upstream_parsed = get_package_contents(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
# Check that pkgrel was reset to 0 when pkgver was changed
if head_parsed["pkgver"] != upstream_parsed["pkgver"] and head_parsed["pkgrel"] != "0":
print(f" - {package}: pkgrel should be 0 when pkgver changes."
"See: https://docs.postmarketos.org/pmaports/main/packaging-guidelines.html#package-versioning-pkgver-pkgrel")
error = True
# Compare head and upstream versions
result = pmb.parse.version.compare(head, upstream)