repo: make local-overlay and meta packages deliver pacman updates

The pacman update channel silently dropped most local changes:

- gen-pacman-repo hardcoded pkgrel=1, ignoring PKG_REV. A package whose
  upstream PKG_VERSION is pinned (e.g. retroarch-joypads, where only the
  local gamepads/ overlay changes) could never produce a newer package,
  so `pacman -Syu` never saw the fix. Read PKG_REV and map it to the repo
  package release (default 1 when unset or dynamic).

- the archr meta package had PKG_VERSION="", so its install_pkg dir was
  "archr-" and the synthesized version was the constant "archr.". The
  main system-config package (system.cfg, runemu, wifictl, governors,
  networkservices) therefore never updated. Stamp it with the build
  timestamp so each rebuild ships a real, monotonically increasing
  version.

- bump retroarch-joypads PKG_REV to 2 so the corrected GO-Super Gamepad
  autoconfig ships as an update.

The kernel/DTB stays out of pacman on purpose: it lives on the FAT boot
partition, which pacman does not manage, so kernel changes ship by image
flash.
This commit is contained in:
Douglas Teles
2026-06-30 16:47:29 -03:00
parent ae837498a3
commit 9ff72420c6
3 changed files with 27 additions and 1 deletions
+9 -1
View File
@@ -3,7 +3,15 @@
# Copyright (C) 2024-present Arch R
PKG_NAME="archr"
PKG_VERSION=""
# archr is a local meta package with no upstream, so it carried an empty
# PKG_VERSION. That made the install_pkg dir "archr-" and gen-pacman-repo
# synthesize the constant version "archr.", so the package version never
# changed and pacman never saw an update for it (the main system config
# package). Stamp it with the build timestamp instead: the literal text
# here is stable (no rebuild churn), but each actual rebuild evaluates a
# fresh, monotonically increasing version, so changes to system.cfg,
# runemu, wifictl, governors etc. ship as real `pacman -Syu` updates.
PKG_VERSION="$(date +%Y%m%d%H%M%S)"
PKG_LICENSE="GPLv2"
PKG_SITE=""
PKG_URL=""
@@ -3,6 +3,11 @@
PKG_NAME="retroarch-joypads"
PKG_VERSION="38cf938bba0adbde375972053068f10d955a9d14"
# PKG_VERSION pins the upstream autoconfig db. The local gamepads/ overlay
# (e.g. the corrected GO-Super Gamepad.cfg) does not change that hash, so
# bump PKG_REV to ship overlay-only fixes as a pacman update. gen-pacman-repo
# now maps PKG_REV to the package release.
PKG_REV="2"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/libretro/retroarch-joypad-autoconfig"
PKG_URL="https://github.com/libretro/retroarch-joypad-autoconfig/archive/${PKG_VERSION}.tar.gz"
+13
View File
@@ -96,7 +96,20 @@ build_one_pkg() {
# turned into a stray '.' by tr -c.
version="$(printf '%s' "${version}" | tr -c 'a-zA-Z0-9.+_' '.')"
# pkgrel comes from the package's PKG_REV (the standard knob for "same
# upstream version, new package build", e.g. a changed local overlay
# like a joypad autoconfig). Hardcoding 1 here meant any local-only
# change never produced a newer package, so pacman never saw it as an
# update. Default to 1 when PKG_REV is unset or dynamic.
local pkgrel=1
if [ -n "${pkgmk}" ]; then
local rev
rev="$(awk -F'"' '/^PKG_REV/ {print $2; exit}' "${pkgmk}")"
case "${rev}" in
''|*'$('* | *'${'* ) : ;;
*) pkgrel="${rev}" ;;
esac
fi
local outfile="${OUT_DIR}/${name}-${version}-${pkgrel}-${ARCH}.pkg.tar.zst"
# .PKGINFO sidecar that pacman reads on install. pkgbase is