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 | |
parent | c40f3fec393a7ec8b3060ec55ec27bffb5a856a7 (diff) | |
download | jenkins.debian.net-3584dcd924ca7b86d0de1c8ce29b8856e31c1f77.tar.xz |
reproducible: insert job source for packages into reproducible.db
-rw-r--r-- | TODO | 3 | ||||
-rwxr-xr-x | bin/reproducible_build.sh | 12 |
2 files changed, 12 insertions, 3 deletions
@@ -90,8 +90,7 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian === reproducible -* have a job which runs failed packages for which a newer version exists, oldest first. doing this in sql is impossible with bash, while easy in python... -* packages from jobs should insert themselves into job_sources and then issue a warning if found in two jobs.. +* watch it build :) === Test Debian live 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 |