Commit 79e9e5ee authored by Cyril Brulebois's avatar Cyril Brulebois

Time-based snapshots: implement 'prepare-build' action.

This makes it possible to keep "latest" as a reference to whatever is
the latest time-based snapshot at the time the build is started, which
is then resolved at configuration time, so that the manifest (generated
at the very end of the build) knows what was actually used for the
Signed-off-by: default avatarCyril Brulebois <>
parent f8f393f9
......@@ -22,6 +22,9 @@ RUN_LB_CONFIG="lb config noauto"
# init config/ with defaults for the target distribution
$RUN_LB_CONFIG --distribution jessie ${@}
# set up everything for time-based snapshots:
auto/scripts/sync-serials prepare-build
MIRROR="$(apt-mirror debian)"
# set Amnesia's general options
......@@ -28,6 +28,16 @@ case "$action" in
printf "\nAll files ($CONFIG/*/serial) have been updated with new serials\n" >&2
cp -r config/APT_snapshots.d tmp
$0 info > tmp/serials
for repo_dir in tmp/APT_snapshots.d/*; do
repo=$(basename $repo_dir)
if grep -qs '^latest$' $repo_dir/serial; then
awk -F': ' "/^$repo: / {print \$2}" tmp/serials > $repo_dir/serial
printf "unknown action ($action), use either 'info' or 'freeze'\n" >&2
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment