From f8010a355a8cb4fd8a25d7d2dc0d0732f2aeb226 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 21 May 2026 00:28:32 -0400 Subject: [PATCH] Rebuild offline repo db from scratch each run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit repo-add --new skips updating entries that are already in the db, so when the omarchy-* packages are rebuilt in place (new content, same filename, because pkgver is constant) the persistent cache's offline.db.tar.gz kept the OLD size/checksum entries. Pacman then read the stale db size and rejected the new file with 'Exceeded the maximum allowed file size'. Delete the db files and let repo-add regenerate them fresh — slower but deterministic, and 'offline.db.tar.gz' is small to rebuild even for the full ~600 package set. --- builder/build-iso.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/builder/build-iso.sh b/builder/build-iso.sh index e39f89a..64e0605 100755 --- a/builder/build-iso.sh +++ b/builder/build-iso.sh @@ -110,7 +110,12 @@ mkdir -p /tmp/offlinedb pacman --config /configs/pacman-online-${OMARCHY_MIRROR}.conf --noconfirm -Syw \ "${all_packages[@]}" --cachedir "$offline_mirror_dir/" --dbpath /tmp/offlinedb --needed -repo-add --new "$offline_mirror_dir/offline.db.tar.gz" "$offline_mirror_dir/"*.pkg.tar.zst +# Rebuild the offline repo db from scratch so size/checksum/depends entries +# always reflect the current .pkg.tar.zst on disk. With the persistent cache, +# 'repo-add --new' skipped updates for already-known package names, leaving +# stale entries when we rebuild omarchy-* in place (new content, same filename). +rm -f "$offline_mirror_dir"/offline.db* "$offline_mirror_dir"/offline.files* +repo-add "$offline_mirror_dir/offline.db.tar.gz" "$offline_mirror_dir/"*.pkg.tar.zst # mkarchiso expects the mirror at /var/cache/omarchy/mirror/offline inside the # container (the airootfs path); symlink rather than duplicate.