Keep syncing a package whose upstream channel has stalled

This commit is contained in:
Felitendo committed 2026-09-20 00:42:44 +02:00
1 parent a08e897f57
commit 8bedb3e664
2 files changed
+21 -9

No files matched your search

+5 -1
View File
@@ -98,7 +98,11 @@ Then create a directory named after the AUR package containing:
single line. single line.
- **`pkg.sh`** — bash sourced by [scripts/update-package.sh](scripts/update-package.sh), - **`pkg.sh`** — bash sourced by [scripts/update-package.sh](scripts/update-package.sh),
defining: defining:
- `latest_version` — prints the latest upstream version, no `v` prefix. - `latest_version` — prints the latest upstream version, no `v` prefix. A
channel that has stopped pointing at a release can return `75`
(`EX_TEMPFAIL`) instead: the run then warns, keeps the version the
`PKGBUILD` has and carries on, so packaging changes still reach the AUR
(`fluxer-bin`).
- `refresh_checksums <version> <pkgbuild-path>` — updates the `sha256sums*` - `refresh_checksums <version> <pkgbuild-path>` — updates the `sha256sums*`
lines for that version. If the asset name carries build metadata that does lines for that version. If the asset name carries build metadata that does
not follow from `pkgver` (see `snapx-bin`, `faugus-launcher-bin`), resolve not follow from `pkgver` (see `snapx-bin`, `faugus-launcher-bin`), resolve
+16 -8
View File
@@ -34,26 +34,34 @@ BUILD_DEPS=()
AUR_PUBLISH=true AUR_PUBLISH=true
source "$pkg/pkg.sh" source "$pkg/pkg.sh"
oldver="$(grep -Po '^pkgver=\K.*' "$pkg/PKGBUILD")"
oldrel="$(grep -Po '^pkgrel=\K.*' "$pkg/PKGBUILD")"
# A package whose upstream release channel is temporarily out of order - a # A package whose upstream release channel is temporarily out of order - a
# "latest" pointer that has stopped pointing at a release - can return 75 # "latest" pointer that has stopped pointing at a release - can return 75
# (EX_TEMPFAIL) from latest_version instead of printing one. There is nothing # (EX_TEMPFAIL) from latest_version instead of printing one. There is nothing
# to update while that lasts and nothing wrong with the package, so the run # to update to while that lasts and nothing wrong with the package, so the run
# warns and stops rather than going red, and the next one picks it up. # warns rather than going red, and the next one tries again.
#
# It carries on with the version the PKGBUILD already has instead of stopping:
# everything below is about the packaging, not the version, and a package
# cannot be fixed at all if a stalled upstream channel also blocks the AUR
# sync - which is exactly what happened to fluxer-bin, whose stable channel
# has been serving canary builds since 0.0.8.
rc=0 rc=0
ver="$(latest_version)" || rc=$? ver="$(latest_version)" || rc=$?
if [[ "$rc" -eq 75 ]]; then if [[ "$rc" -eq 75 ]]; then
echo "::warning::$pkg: upstream has no current release to track right now -" \ echo "::warning::$pkg: upstream has no current release to track right now -" \
"leaving the package as it is, the next run tries again." "leaving the version alone, the next run tries again."
exit 0 ver="$oldver"
fi fi
if [[ -z "$ver" || "$ver" == "null" ]]; then if [[ -z "$ver" || "$ver" == "null" ]]; then
echo "::error::$pkg: could not determine the latest upstream version" echo "::error::$pkg: could not determine the latest upstream version"
exit 1 exit 1
fi fi
echo "$pkg: latest upstream version is $ver" if [[ "$rc" -ne 75 ]]; then
echo "$pkg: latest upstream version is $ver"
oldver="$(grep -Po '^pkgver=\K.*' "$pkg/PKGBUILD")" fi
oldrel="$(grep -Po '^pkgrel=\K.*' "$pkg/PKGBUILD")"
### 2: bring the PKGBUILD up to date ######################################## ### 2: bring the PKGBUILD up to date ########################################