Explicitly create empty reprepro dists

Call `reprepro export` to always recreate indices, even for empty
dists. This is sort of a shotgun approach, local testing on the
server indicates it increases total time of a noop update by ~5.5
minutes for the "debian" repo, which is by far the worst case of
anything we mirror.

If this proves problematic, we can engineer a more targeted solution
to check for empty dists and only export those.

Change-Id: I7e39e427e1941f055fae0408e4c1f2a2f2b35547
This commit is contained in:
Jeremy Stanley 2021-03-31 19:23:14 +00:00
parent b0ff8c64bb
commit 08af9a5ab8
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,9 @@ REPREPRO="$K5START reprepro --confdir $REPREPRO_CONFIG"
echo_ts "Obtaining reprepro tokens and running reprepro update"
$REPREPRO update
echo_ts "Explicitly generating dist indices just in case some are missing"
$REPREPRO export
if [ -f $UNREF_FILE ] ; then
echo_ts "Cleaning up files made unreferenced on the last run"
$REPREPRO deleteifunreferenced < $UNREF_FILE