mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
3d18661bf8
The image rootfs is a squashfs, not a pacman install, so /var/lib/pacman (-> /storage/.pacman/db) ships empty: on every device `pacman -Q` returns 0 and `pacman -Qu` finds nothing, so archr-update / `pacman -Syu` reports "No updates available" even when the repo carries newer base packages. The headline 2.0 update path therefore only ever installed user addons, never upgraded the base system (confirmed live: local/ holds only ALPM_DB_VERSION). Fix in two self-contained parts (no image-build wiring, so the seed always matches the build that produced it): - gen-pacman-repo: after building the sync db, register every just-built package as installed (`pacman -U --dbonly`, files already in the squashfs) and publish the resulting local/ tree as <repo>-localdb.tar.gz alongside the packages. - autostart/004-seed-pacmandb: on first boot, if the local db is still empty (only ALPM_DB_VERSION) and the network is up, pull <repo>-localdb.tar.gz from the configured release channel and extract it into /storage/.pacman/db. Idempotent and skipped once the db is populated, so a user's own pacman activity is never clobbered. PENDING VALIDATION: needs a full build + repo publish to confirm the seed is produced and that `pacman -Syu` then sees base upgrades. Best-effort on the generator side (logs a warning rather than failing the repo build). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>