[Qa-jenkins-scm] [jenkins.debian.net] 06/08: reproducible: also save the --text output of debbindiff

Holger Levsen holger at moszumanska.debian.org
Sun Jul 5 12:01:46 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 a0a54ab8771f0e6878c86d0dbf2f344ec965aa5a
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Wed Jun 17 00:00:40 2015 +0000

    reproducible: also save the --text output of debbindiff
---
 bin/reproducible_breakages.py     | 9 +++++++--
 bin/reproducible_build.sh         | 6 ++++++
 bin/reproducible_common.py        | 4 ++++
 bin/reproducible_html_packages.py | 8 ++++++++
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_breakages.py b/bin/reproducible_breakages.py
index 208140f..88c4bca 100755
--- a/bin/reproducible_breakages.py
+++ b/bin/reproducible_breakages.py
@@ -158,7 +158,12 @@ def alien_log(directory=None):
     return bad_files
 
 
-def alien_dbd():
+def alien_dbd(directory=None):
+    if directory is None:
+        bad_files = []
+        for path in DBD_PATH, DBDTXT_PATH:
+            bad_files.extend(alien_log(path))
+        return bad_files
     log.info('running alien_dbd check...')
     query = '''SELECT r.status
                FROM sources AS s JOIN results AS r on r.package_id=s.id
@@ -166,7 +171,7 @@ def alien_dbd():
                AND s.architecture="{arch}"
                ORDER BY s.name ASC, s.suite DESC'''
     bad_files = []
-    for root, dirs, files in os.walk(DBD_PATH):
+    for root, dirs, files in os.walk(directory):
         if not files:
             continue
         suite, arch = root.rsplit('/', 2)[1:]
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index eba6798..27076c0 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -228,6 +228,10 @@ handle_ftbr() {
 	else
 		echo "$(date) - $DBDVERSION produced no output (which is strange)." | tee -a $RBUILDLOG
 	fi
+	if [ -f ./$DBDTXT ] ; then
+		mv ./$DBDTXT $BASE/dbdtxt/$SUITE/$ARCH/
+		gzip -9n $BASE/dbdtxt/$SUITE/$ARCH/$DBDTXT
+	fi
 	calculate_build_duration
 	update_db_and_html "unreproducible"
 }
@@ -283,6 +287,7 @@ call_debbindiff() {
 		-c source:jenkins-reproducible-${DBDSUITE}-debbindiff \
 		-- sh -c "export TMPDIR=$TEMP ; debbindiff \
 			--html $TMPDIR/${DBDREPORT} \
+			--text $TMPDIR/$DBDTXT \
 			$TMPDIR/b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes \
 			$TMPDIR/b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes" \
 	) 2>&1 >> $TMPLOG
@@ -524,6 +529,7 @@ get_source_package
 VERSION="$(grep '^Version: ' ${SRCPACKAGE}_*.dsc| head -1 | egrep -v '(GnuPG v|GnuPG/MacGPG2)' | cut -d ' ' -f2-)"
 EVERSION="$(echo $VERSION | cut -d ':' -f2)"  # EPOCH_FREE_VERSION was too long
 DBDREPORT="${SRCPACKAGE}_${EVERSION}.debbindiff.html"
+DBDTXT="${SRCPACKAGE}_${EVERSION}.debbindiff.txt"
 BUILDINFO="${SRCPACKAGE}_${EVERSION}_${ARCH}.buildinfo"
 
 cat ${SRCPACKAGE}_${EVERSION}.dsc | tee -a ${RBUILDLOG}
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 7e2c5f4..eca9140 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -42,6 +42,7 @@ REPRODUCIBLE_JSON = BASE + '/reproducible.json'
 REPRODUCIBLE_DB = '/var/lib/jenkins/reproducible.db'
 
 DBD_URI = '/dbd'
+DBDTXT_URI = '/dbdtxt'
 LOGS_URI = '/logs'
 DIFFS_URI = '/logdiffs'
 NOTES_URI = '/notes'
@@ -50,6 +51,7 @@ RB_PKG_URI = '/rb-pkg'
 RBUILD_URI = '/rbuild'
 BUILDINFO_URI = '/buildinfo'
 DBD_PATH = BASE + DBD_URI
+DBDTXT_PATH = BASE + DBDTXT_URI
 LOGS_PATH = BASE + LOGS_URI
 DIFFS_PATH = BASE + DIFFS_URI
 NOTES_PATH = BASE + NOTES_URI
@@ -83,6 +85,8 @@ log.debug("BIN_PATH:\t" + BIN_PATH)
 log.debug("BASE:\t\t" + BASE)
 log.debug("DBD_URI:\t\t" + DBD_URI)
 log.debug("DBD_PATH:\t" + DBD_PATH)
+log.debug("DBDTXT_URI:\t" + DBDTXT_URI)
+log.debug("DBDTXT_PATH:\t" + DBDTXT_PATH)
 log.debug("LOGS_URI:\t" + LOGS_URI)
 log.debug("LOGS_PATH:\t" + LOGS_PATH)
 log.debug("DIFFS_URI:\t" + DIFFS_URI)
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 2279fc5..ac85c76 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -130,6 +130,8 @@ def gen_extra_links(package, version, suite, arch, status):
                 '_' + eversion + '_amd64.buildinfo'
     dbd = DBD_PATH + '/' + suite + '/' + arch + '/' + package + '_' + \
           eversion + '.debbindiff.html'
+    dbdtxt = DBDTXT_PATH + '/' + suite + '/' + arch + '/' + package + '_' + \
+          eversion + '.debbindiff.txt.gz'
 
     links = ''
     default_view = ''
@@ -150,6 +152,12 @@ def gen_extra_links(package, version, suite, arch, status):
         if status == 'unreproducible':
             log.critical(REPRODUCIBLE_URL + '/' + suite + '/' + arch + '/' + package +
                          ' is unreproducible, but without debbindiff output.')
+    if os.access(dbdtxt, os.R_OK):
+        url = DBDTXT_URI + '/' + suite + '/' + arch + '/' +  package + '_' + \
+              eversion + '.debbindiff.txt'
+        links += '<a href="' + url + '" target="main">(txt)</a>\n'
+        if not default_view:
+            default_view = url
     if pkg_has_buildinfo(package, version, suite):
         url = BUILDINFO_URI + '/' + suite + '/' + arch + '/' + package + \
               '_' + eversion + '_amd64.buildinfo'

-- 
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