From 31e2a7f9b689f8e726e9076651129c21e315d2d8 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 5 Oct 2014 03:32:18 +0200 Subject: reproducible: drop job_sources table and code --- bin/reproducible_build.sh | 15 +-------------- bin/reproducible_setup.sh | 4 ---- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 21ddaf1c..691e43ea 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -44,12 +44,6 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then fi done AMOUNT=$REAL_AMOUNT - for PKG in $PACKAGES ; do - RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM job_sources 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 randomly picked and where a new version is available CSVFILE=$(mktemp) @@ -58,7 +52,7 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then echo ".import $CSVFILE sources" | sqlite3 -csv -init $INIT ${PACKAGES_DB} rm $CSVFILE AMOUNT=33 - PACKAGES=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT DISTINCT source_packages.name FROM source_packages,sources,job_sources WHERE sources.version IN (SELECT version FROM sources WHERE name=source_packages.name ORDER by sources.version DESC LIMIT 1) AND (( source_packages.status = 'unreproducible' OR source_packages.status = 'FTBFS') AND source_packages.name = job_sources.name AND source_packages.name = sources.name AND job_sources.job = 'random' AND source_packages.version < sources.version) ORDER BY source_packages.build_date LIMIT $AMOUNT" | xargs -r echo) + PACKAGES=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT DISTINCT source_packages.name FROM source_packages,sources WHERE sources.version IN (SELECT version FROM sources WHERE name=source_packages.name ORDER by sources.version DESC LIMIT 1) AND (( source_packages.status = 'unreproducible' OR source_packages.status = 'FTBFS') AND source_packages.name = sources.name AND source_packages.version < sources.version) ORDER BY source_packages.build_date LIMIT $AMOUNT" | xargs -r echo) echo "Info: Only unreproducible and FTBFS packages with a new version available are selected from this job." AMOUNT=0 for PKG in $PACKAGES ; do @@ -72,13 +66,6 @@ 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_sources WHERE ( name = '${PKG}' AND job = '$JOB' )") - if [ "$RESULT" = "" ] ; then - sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','$JOB')" - fi - done fi echo "=============================================================================" echo "The following source packages will be build: ${PACKAGES}" diff --git a/bin/reproducible_setup.sh b/bin/reproducible_setup.sh index 0be8089b..70c02fe7 100755 --- a/bin/reproducible_setup.sh +++ b/bin/reproducible_setup.sh @@ -22,10 +22,6 @@ if [ ! -f ${PACKAGES_DB} ] ; then (suite TEXT NOT NULL, amount INTEGER NOT NULL, PRIMARY KEY (suite))' - sqlite3 ${PACKAGES_DB} ' - CREATE TABLE job_sources - (name TEXT NOT NULL, - job TEXT NOT NULL)' sqlite3 ${PACKAGES_DB} ' CREATE TABLE sources (name TEXT NOT NULL, -- cgit v1.2.3-70-g09d2