ci: grep: disallow nonfree-firmware subpackages
The original disallowing of these subpackages happened in 2024. It was expected that device packages would be voluntarily migrated by the maintainers to reflect this new rule. But, this never happened. Thus, enforcing this on all new and changed packages will force the fixing of these packages. This is not a treewide because so many packages still use the nonfree-firmware subpackage logic that an MR would be an absolute pain to handle and rebase. This is also a very easy fix to incorporate into unrelated changes. See https://postmarketos.org/edge/2024/02/15/default-nonfree-fw/ Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8914>
This commit is contained in:
+12
@@ -180,6 +180,18 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disallow non-free firmware subpackages
|
||||
CHANGED_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
|
||||
|
||||
if [ -n "$CHANGED_APKBUILDS" ]; then
|
||||
if [ -n "$(grep -r 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS || true)" ]; then
|
||||
echo "ERROR: Please remove the nonfree-firmware subpackage(s) and move the firmware to depends in the following APKBUILDs."
|
||||
echo "See https://docs.postmarketos.org/pmaports/main/packaging/firmware-packages.html"
|
||||
grep --color=always -l 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get latest commit message in MR
|
||||
case "$CI_COMMIT_DESCRIPTION" in
|
||||
*"[ci:skip-grep]"*)
|
||||
|
||||
Reference in New Issue
Block a user