easy-build.sh: create top-level Release file for local packages

Without this, apt would try and download way too many indices, resulting
in 128 “Ign:” lines. With this, we're down to 4 “Ign:” lines (Release.gpg
and InRelease, twice).

Funnily enough, that changes apt's behaviour, which suddenly requires
uncompressed Packages to be present.
This commit is contained in:
Cyril Brulebois 2023-01-23 20:25:21 +01:00
parent cc53129b15
commit 2183089968
1 changed files with 12 additions and 1 deletions

View File

@ -33,4 +33,15 @@ else
fi
[ -d $repo ] || mkdir -p $repo
echo Creating Packages file for $repo...
apt-ftparchive packages $repo | pigz -9nm >$repo/Packages.gz
apt-ftparchive packages $repo > $repo/Packages
# Fun fact, at least when building bookworm images on bullseye:
# - a missing Release file is fine, but maybe downloads follow;
# - a present Release file means uncompressed Packages must be present.
echo Creating Release file for dists/$distr...
(
cd dists/$distr
rm -f Release*
(echo "Codename: $distr"; apt-ftparchive release .) > Release.tmp
mv -f Release.tmp Release
)