fix(offline-repo): commit the bundle pool policy and the guard for it

Follow-up to fc4c87c, which committed the pool files themselves. This records
the .gitignore rule that stops excluding built/pool/ and the two assertions that
keep it that way: the suite now fails if either the bundle's pool/ or its index
becomes gitignored, because a cloning device receives nothing but what the
repository tracks.

Verified: check-offline-repo-static.sh 140/140 with the pool committed.
This commit is contained in:
emirhanmamak-blueforce 2026-09-16 22:14:27 +03:00
parent fc4c87c9ab
commit d6d22c6e56
2 changed files with 26 additions and 6 deletions

14
.gitignore vendored
View file

@ -40,12 +40,14 @@ packages.lock.tsv
!provisioning/offline-repo/built/
!provisioning/offline-repo/built/**
#
# Except the bundle's own pool/ copy of the .deb files: those packages are
# already tracked once under provisioning/offline-repo/packages/, and the same
# ~890 MB does not need a second path in the repository. What the installer
# needs from this directory is the index (Packages, Packages.gz,
# packages.lock.tsv, SHA256SUMS) plus repo-manifest.yaml.
provisioning/offline-repo/built/pool/
# The bundle's pool/ IS committed, deliberately. blueforce-install.sh resolves
# every pinned package as "<bundle>/pool/<source>" (its lock rows carry
# "pool/<file>.deb"), so a device that clones the repository needs those files
# on disk. Excluding them left the installer with an index but no packages and
# it stopped with "Kilitte yazılı paket depoda yok". The same blobs also live
# under packages/, which is the intake directory the maintainer commits from;
# Git LFS stores one object per content hash, so the duplication is a path, not
# a second copy of the bytes.
# Documentation site (generated)
docs-site/node_modules/

View file

@ -371,6 +371,24 @@ grep -q 'DEĞİŞİKLİK YOK' "$BUILD_INDEX" && pass 'build-index.sh detects an
grep -q 'repo-manifest.yaml' "$BUILD_INDEX" && pass 'build-index.sh maintains repo-manifest.yaml' || fail 'build-index.sh must maintain repo-manifest.yaml'
grep -q 'bu depoya ait olmayan dosya' "$BUILD_INDEX" && pass 'build-index.sh refuses to delete a foreign output directory' || fail 'build-index.sh must not clobber a foreign output directory'
grep -q 'git add -f' "$BUILD_INDEX" && pass 'build-index.sh prints the git add -f step the .gitignore requires' || fail 'build-index.sh must print the commit command'
# The bundle's pool must be deliverable. blueforce-install.sh resolves every
# pinned package as "<bundle>/pool/<source>", so a device that clones the
# repository needs those .deb files on disk -- not just the index. An earlier
# .gitignore rule excluded built/pool/, which left the device with an index and
# no packages and stopped the install at "Kilitte yazılı paket depoda yok".
if [[ -d "$OFFLINE_REPO/built" ]]; then
if git -C "$REPO_ROOT" check-ignore -q -- "provisioning/offline-repo/built/pool" 2>/dev/null; then
fail 'provisioning/offline-repo/built/pool is gitignored; a clone would not carry the packages'
else
pass 'the bundle pool is not gitignored (a clone carries the packages)'
fi
if git -C "$REPO_ROOT" check-ignore -q -- "provisioning/offline-repo/built/Packages" 2>/dev/null; then
fail 'provisioning/offline-repo/built/Packages is gitignored; a clone would not carry the index'
else
pass 'the bundle index is not gitignored'
fi
fi
grep -q 'built' "$BUILD_INDEX" && pass 'build-index.sh documents the built/ bundle path' || fail 'build-index.sh must document the bundle path'
# repo-manifest.yaml is the repository record: shape, not data, at rest.