summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-04-18 19:22:15 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 19:22:15 +0200
commit08ea744810b96674fe0f8591c83a9bd79bd44905 (patch)
tree37046590a26a5f1783d30a2cebfd90250b432329 /bin
parent36ea8fb164e670d5c1b05eb7675306a5f92c3757 (diff)
downloadjenkins.debian.net-08ea744810b96674fe0f8591c83a9bd79bd44905.tar.xz
reproducible: slightly rename functions
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index a43f9b73..1658f0b2 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -30,7 +30,7 @@ create_results_dirs() {
mkdir -p /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}
}
-handle_race() {
+handle_race_condition() {
echo | tee -a $BUILDLOG
local msg="Warning, package ${SRCPACKAGE} in ${SUITE} on ${ARCH} is probably already building elsewhere, exiting.\n"
local msg="${msg}Please check $BUILD_URL and https://reproducible.debian.net/$SUITE/$ARCH/${SRCPACKAGE} for a different build.\n"
@@ -51,9 +51,9 @@ handle_race() {
exit 0
}
-check_for_races() {
+check_for_race_conditions() {
if [ $$ -ne $(cat "$LOCKFILE") ] ; then
- handle_race lockfile
+ handle_race_condition lockfile
fi
}
@@ -298,12 +298,12 @@ init() {
if [ -z $(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT date_build_started FROM schedule WHERE package_id = '$SRCPKGID'") ] ; then
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');"
else
- handle_race db
+ handle_race_condition db
fi
if [ ! -f "$LOCKFILE" ] ; then
echo $$ > "$LOCKFILE"
else
- handle_race init
+ handle_race_condition init
fi
echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG}
echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG}
@@ -363,7 +363,7 @@ build_rebuild() {
set +x
if [ -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
# the first build did not FTBFS, try rebuild it.
- check_for_races
+ check_for_race_conditions
echo "============================================================================="
echo "Re-building ${SRCPACKAGE}/${VERSION} in ${SUITE} on ${ARCH} now."
echo "============================================================================="
@@ -432,15 +432,15 @@ BUILDINFO="${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo"
cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG}
-check_for_races
+check_for_race_conditions
check_suitability
-check_for_races
+check_for_race_conditions
build_rebuild # defines FTBFS redefines RBUILDLOG
if [ $FTBFS -eq 0 ] ; then
call_debbindiff # defines DBDVERSION
fi
-check_for_races
+check_for_race_conditions
cd ..
cleanup_all
trap - INT TERM EXIT