summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_build.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-10 11:59:36 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-10 11:59:36 +0200
commit84a31cbbf787aab56f4d0c2a497aa264f953c817 (patch)
tree756f00eac97c0b8b1f8bf45d321eeca716fd772a /bin/reproducible_build.sh
parent064e46b4a50e165b0046a51982dbb31617dc1389 (diff)
downloadjenkins.debian.net-84a31cbbf787aab56f4d0c2a497aa264f953c817.tar.xz
reproducible: only download the .dsc on the main node when doing remote builds
Diffstat (limited to 'bin/reproducible_build.sh')
-rwxr-xr-xbin/reproducible_build.sh20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 518531e8..fdbfbf41 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -402,8 +402,14 @@ init() {
get_source_package() {
local RESULT
- schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE} 2>&1 | tee -a ${RBUILDLOG}
- RESULT=$?
+ if [ "$MODE" != "ng" ] ; then
+ schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE} 2>&1 | tee -a ${RBUILDLOG}
+ RESULT=$?
+ else
+ # remote build, no need to download the full source package...
+ schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs wget
+ RESULT=$?
+ fi
if [ $RESULT != 0 ] || [ "$(ls ${SRCPACKAGE}_*.dsc 2> /dev/null)" = "" ] ; then
# sometimes apt-get cannot download a package for whatever reason.
# if so, wait some time and try again. only if that fails, give up.
@@ -411,8 +417,14 @@ get_source_package() {
ls -l ${SRCPACKAGE}* | tee -a ${RBUILDLOG}
echo "$(date -u ) - sleeping 5m before re-trying..." | tee -a ${RBUILDLOG}
sleep 5m
- schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE} 2>&1 | tee -a ${RBUILDLOG}
- RESULT=$?
+ if [ "$MODE" != "ng" ] ; then
+ schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source source ${SRCPACKAGE} 2>&1 | tee -a ${RBUILDLOG}
+ RESULT=$?
+ else
+ # remote build, no need to download the full source package...
+ schroot --directory $TMPDIR -c source:jenkins-reproducible-$SUITE apt-get -- --download-only --only-source --print-uris source ${SRCPACKAGE} | grep \.dsc|cut -d " " -f1|xargs wget
+ RESULT=$?
+ fi
fi
if [ $RESULT != 0 ] || [ "$(ls ${SRCPACKAGE}_*.dsc 2> /dev/null)" = "" ] ; then
if [ "$MODE" = "legacy" ] || [ "$MODE" = "ng" ] ; then