summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rwxr-xr-xbin/reproducible_build.sh12
2 files changed, 12 insertions, 3 deletions
diff --git a/TODO b/TODO
index 89a4d7d3..ea5f8ee8 100644
--- a/TODO
+++ b/TODO
@@ -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