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

reproducible Debian live: Occasionally the archive gets updated between two builds



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent ebc41db0
...@@ -153,7 +153,7 @@ set -e ...@@ -153,7 +153,7 @@ set -e
if [ ${RETURNVALUE} -eq 99 -a "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then if [ ${RETURNVALUE} -eq 99 -a "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then
# The archive was updated while building. Retry # The archive was updated while building. Retry
output_echo "Info: meanwhile the archive was updated, now trying again." output_echo "Info: during the first build the archive was updated, now trying again."
rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}" rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
elif [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then elif [ ${RETURNVALUE} -ne 0 -o ${BUILD_OK_FOUND} -ne 0 ]; then
# Something went wrong. Perhaps an alternative timestamp is proposed # Something went wrong. Perhaps an alternative timestamp is proposed
...@@ -184,12 +184,21 @@ rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}" ...@@ -184,12 +184,21 @@ rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
RETURNVALUE=$? RETURNVALUE=$?
set -e set -e
if [ ${RETURNVALUE} -eq 99 -a "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then if [ "${SNAPSHOT_TIMESTAMP}" == "archive" ]; then
# The archive was updated while building. Discard the first build and retry if [ ${RETURNVALUE} -eq 99 ]; then
output_echo "Info: meanwhile the archive was updated, now trying again." # The archive was updated while building. The content might not be consistent.
# Discard the first build and retry
output_echo "Info: during the second build the archive was updated, now trying again."
mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION} mv live-image-amd64.hybrid.iso ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}
mv summary.txt ${RESULTSDIR}/summary_build1.txt mv summary.txt ${RESULTSDIR}/summary_build1.txt
rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}" rebuild_script/test/rebuild.sh "$1" "$2" "${SNAPSHOT_TIMESTAMP}"
elif [ $(stat ${RESULTSDIR}/b1/${PROJECTNAME}/${CONFIGURATION}/live-image-amd64.hybrid.iso live-image-amd64.hybrid.iso | grep Modify: | uniq | wc -l) -ne 1 ]; then
# The timestamps are different. Discard the first build and retry
output_echo "Info: between the builds 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
fi fi
# Move the image away # Move the image away
......
...@@ -47,7 +47,7 @@ warning /Warning: diffoscope returned error code/ ...@@ -47,7 +47,7 @@ warning /Warning: diffoscope returned error code/
error /Error: Bad argument/ error /Error: Bad argument/
error /Error: the image could not be built, no alternative was proposed/ 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: The snapshot server is not available, using deb.debian.org instead/
info /Info: meanwhile the archive was updated, now trying again/ info /Info: .+ the archive was updated, now trying again/
# Do not log the warning from the rebuild script: /Warning: meanwhile the archive was updated/ # 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 /Warning: the build failed with .+ Now trying again using the previous snapshot instead/
info /Info: using live-build from git/ info /Info: using live-build from git/
......
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