Commit 7b28da62 authored by Roland Clobus's avatar Roland Clobus Committed by Holger Levsen
Browse files

reproducible_debian_live_build: Retry instead of give up when the


archive was synced while building an ISO image

Also update the logparse rules with the new messages

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent e4d7f0b5
......@@ -151,7 +151,11 @@ grep --quiet --no-messages "Build result: 0" summary.txt
BUILD_OK_FOUND=$?
set -e
if [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then
if [ ${RETURNVALUE} -eq 99 -a "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then
# The archive was updated while building. Retry
output_echo "Info: meanwhile the archive was updated, now trying again."
rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
elif [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then
# Something went wrong. Perhaps an alternative timestamp is proposed
SNAPSHOT_TIMESTAMP=$(grep --no-messages "Alternative timestamp:" summary.txt | cut -f 3 -d " ")
if [ -z ${SNAPSHOT_TIMESTAMP} ]; then
......@@ -175,7 +179,18 @@ mv summary.txt ${RESULTSDIR}/summary_build1.txt
# Second build
output_echo "Running the rebuild script for the 2nd build."
set +e # We are interested in the return value
rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
RETURNVALUE=$?
set -e
if [ ${RETURNVALUE} -eq 99 -a "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then
# The archive was updated while building. Discard the first build and retry
output_echo "Info: meanwhile the archive was updated, now trying again."
mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
mv summary.txt ${RESULTSDIR}/summary_build1.txt
rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
fi
# Move the image away
mkdir -p ${RESULTSDIR}/b2/${PROJECTNAME}/${CONFIGURATION}
......
......@@ -45,8 +45,14 @@ warning /Warning: lb .+ failed with/
warning /Warning: diffoscope detected differences in the images/
warning /Warning: diffoscope returned error code/
error /Error: Bad argument/
error /Error: the image could not be built, no alternative was proposed/
info /Info: The snapshot server is not available, using deb.debian.org instead/
info /Info: meanwhile the archive was updated, now trying again/
# Do not log the warning from the rebuild script: /Warning: meanwhile the archive was updated/
info /Warning: the build failed with .+ Now trying again using the previous snapshot instead/
info /Info: using live-build from git/
info /Info: using the snapshot from/
info /Info: no differences found/
info /Reproducible hook has been applied/
# If a reproducible hook has been applied, show it as a warning
warning /Reproducible hook has been applied/
Supports Markdown
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