diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-09-30 00:16:34 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-09-30 00:16:34 +0200 |
commit | 3584dcd924ca7b86d0de1c8ce29b8856e31c1f77 (patch) | |
tree | 946fe4337aa98e9517b01b2ce1d1f37db8b1a70e /bin | |
parent | c40f3fec393a7ec8b3060ec55ec27bffb5a856a7 (diff) | |
download | jenkins.debian.net-3584dcd924ca7b86d0de1c8ce29b8856e31c1f77.tar.xz |
reproducible: insert job source for packages into reproducible.db
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 12 |
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 |