[Qa-jenkins-scm] [jenkins.debian.net] 01/03: reproducible: teach _blacklist.sh to clean up packages files when blacklisting

Holger Levsen holger at moszumanska.debian.org
Fri Aug 7 15:09:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit ace932886788343aec73582439b2e049e7742182
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Fri Aug 7 15:03:28 2015 +0000

    reproducible: teach _blacklist.sh to clean up packages files when blacklisting
---
 TODO                          | 1 -
 bin/reproducible_blacklist.sh | 3 +++
 bin/reproducible_build.sh     | 9 ---------
 bin/reproducible_common.sh    | 9 +++++++++
 4 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/TODO b/TODO
index f08a906..bd40e76 100644
--- a/TODO
+++ b/TODO
@@ -191,7 +191,6 @@ properties:
 ** a reproducible_log_grep_by_sql.(py|sh) would be nice, to only grep in packages with a certain status (build in the last X days)
 ** replace submit form by one without javascript (maybe with more url rewriting)
 ** when a package is automatically rescheduled because of the mirror was updated between the two tests, there will be three rbuild logs in one. thats confusing, the first one should be dropped.
-** reproducible_blacklist.sh should delete rbuild logs and debbindiff output too
 ** adopt usertag script from pkg-apparmor to notify us about new usertagged bugs automatically
 ** fix apache ssl configuration as hinted by eg https://sslcheck.globalsign.com/de/sslcheck?host=jenkins.debian.net#78.137.96.196
 ** create a symbol for pending bugs or use a different color to indicate them
diff --git a/bin/reproducible_blacklist.sh b/bin/reproducible_blacklist.sh
index 9de1b68..528225b 100755
--- a/bin/reproducible_blacklist.sh
+++ b/bin/reproducible_blacklist.sh
@@ -11,11 +11,14 @@ common_init "$@"
 # common code defining db access
 . /srv/jenkins/bin/reproducible_common.sh
 
+ARCH=amd64  # FIXME - multiarchify
+
 blacklist_packages() {
 	DATE=$(date +'%Y-%m-%d %H:%M')
 	for PKG in $PACKAGES ; do
 		VERSION=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT version FROM sources WHERE name='$PKG' AND suite='$SUITE';")
 		PKGID=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT id FROM sources WHERE name='$PKG' AND suite='$SUITE';")
+		cleanup_userContent
 		sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date) VALUES ('$PKGID', '$VERSION', 'blacklisted', '$DATE');"
 	done
 }
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 65c632f..6a6978c 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -105,15 +105,6 @@ cleanup_all() {
 	if ! $BAD_LOCKFILE ; then rm -f $LOCKFILE ; fi
 }
 
-cleanup_userContent() {
-	rm -vf $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_*.rbuild.log{,.gz}
-	rm -vf $BASE/logs/${SUITE}/${ARCH}/${SRCPACKAGE}_*.build?.log{,.gz}
-	rm -vf $BASE/dbd/${SUITE}/${ARCH}/${SRCPACKAGE}_*.debbindiff.html
-	rm -vf $BASE/dbdtxt/${SUITE}/${ARCH}/${SRCPACKAGE}_*.debbindiff.txt{,.gz}
-	rm -vf $BASE/buildinfo/${SUITE}/${ARCH}/${SRCPACKAGE}_*.buildinfo
-	rm -vf $BASE/logdiffs/${SUITE}/${ARCH}/${SRCPACKAGE}_*.diff{,.gz}
-}
-
 update_db_and_html() {
 	# everything passed at this function is saved as a status of this package in the db
 	STATUS="$@"
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index 569cb56..5b6faf3 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -439,6 +439,15 @@ get_filesize() {
 		fi
 }
 
+cleanup_userContent() {
+	rm -vf $BASE/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_*.rbuild.log{,.gz}
+	rm -vf $BASE/logs/${SUITE}/${ARCH}/${SRCPACKAGE}_*.build?.log{,.gz}
+	rm -vf $BASE/dbd/${SUITE}/${ARCH}/${SRCPACKAGE}_*.debbindiff.html
+	rm -vf $BASE/dbdtxt/${SUITE}/${ARCH}/${SRCPACKAGE}_*.debbindiff.txt{,.gz}
+	rm -vf $BASE/buildinfo/${SUITE}/${ARCH}/${SRCPACKAGE}_*.buildinfo
+	rm -vf $BASE/logdiffs/${SUITE}/${ARCH}/${SRCPACKAGE}_*.diff{,.gz}
+}
+
 #
 # create the png (and query the db to populate a csv file...)
 #

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list