summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-30 00:16:34 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-30 00:16:34 +0200
commit3584dcd924ca7b86d0de1c8ce29b8856e31c1f77 (patch)
tree946fe4337aa98e9517b01b2ce1d1f37db8b1a70e /bin
parentc40f3fec393a7ec8b3060ec55ec27bffb5a856a7 (diff)
downloadjenkins.debian.net-3584dcd924ca7b86d0de1c8ce29b8856e31c1f77.tar.xz
reproducible: insert job source for packages into reproducible.db
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 96560527..bbdc215f 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -78,7 +78,10 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then
done
AMOUNT=$REAL_AMOUNT
for PKG in $PACKAGES ; do
- sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','random')"
+ RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM job_source WHERE ( name = '${PKG}' AND job = 'random' )")
+ if [ "$RESULT" != "" ] ; then
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','random')"
+ fi
done
else
# this is kind of a hack: if $1 is 0, then schedule 33 failed packages which were nadomly picked and where a new version is available
@@ -102,6 +105,13 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then
else
PACKAGES="$@"
AMOUNT="${#@}"
+ JOB=$(echo $JOB_NAME|cut -d "_" -f3)
+ for PKG in $PACKAGES ; do
+ RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM job_source WHERE ( name = '${PKG}' AND job = '$JOB' )")
+ if [ "$RESULT" != "" ] ; then
+ sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','$JOB')"
+ fi
+ done
fi
set +x
echo