[Reproducible-commits] [misc] 01/01: adjust diffoscope hook to dynamic builddirs

Sascha Steinbiss satta at debian.org
Wed Aug 10 23:59:10 UTC 2016


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

satta pushed a commit to branch master
in repository misc.

commit a5442d31cd6728f83f1cd5a82bbf17d294511427
Author: Sascha Steinbiss <satta at debian.org>
Date:   Wed Aug 10 23:49:22 2016 +0000

    adjust diffoscope hook to dynamic builddirs
---
 prebuilder/pbuilderhooks/B92_diffoscope | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/prebuilder/pbuilderhooks/B92_diffoscope b/prebuilder/pbuilderhooks/B92_diffoscope
index ca0bf5a..442e1cc 100755
--- a/prebuilder/pbuilderhooks/B92_diffoscope
+++ b/prebuilder/pbuilderhooks/B92_diffoscope
@@ -16,23 +16,25 @@ print_reproducible() {
 	echo
 }
 
-[ -f /tmp/buildd/initial_build.tar ] || exit 0
+echo "I: BUILDDIR is $BUILDDIR"
+
+[ -f $BUILDDIR/initial_build.tar ] || exit 0
 
 echo "I: unpacking initial build material"
 mkdir -p /tmp/initial_build
-tar -C /tmp/initial_build -xf /tmp/buildd/initial_build.tar
-rm /tmp/buildd/initial_build.tar
+tar -C /tmp/initial_build -xf $BUILDDIR/initial_build.tar
+rm $BUILDDIR/initial_build.tar
 
 
 echo "I: comparing build artefacts with cmp"
 [ -x /usr/bin/dcmd ] || apt-get install -y --no-install-recommends devscripts 2>&1 > /dev/null
 FILES1=$(dcmd find /tmp/initial_build/*.changes -exec basename '{}' \; | LC_ALL=C sort)
-FILES2=$(dcmd find /tmp/buildd/*.changes -exec basename '{}' \; | LC_ALL=C sort)
+FILES2=$(dcmd find $BUILDDIR/*.changes -exec basename '{}' \; | LC_ALL=C sort)
 if [ "$FILES1" = "$FILES2" ]; then
 	DIFF=0
 	for file in $FILES1;
 	do
-		cmp -s "/tmp/initial_build/$file" "/tmp/buildd/$file"
+		cmp -s "/tmp/initial_build/$file" "$BUILDDIR/$file"
 		DIFF=$?
 		[ $DIFF -gt 0 ] && break
 	done
@@ -46,10 +48,10 @@ fi
 
 echo "I: installing diffoscope..."
 apt-get install -y --install-recommends sudo diffoscope 2>&1 > /dev/null
-touch /tmp/buildd/diffoscope.{txt,html}
-chown nobody /tmp/buildd/diffoscope.{txt,html}
+touch $BUILDDIR/diffoscope.{txt,html}
+chown nobody $BUILDDIR/diffoscope.{txt,html}
 echo "I: running it on the package..."
-if sudo -u nobody diffoscope --text /tmp/buildd/diffoscope.txt --html /tmp/buildd/diffoscope.html /tmp/initial_build/*.changes /tmp/buildd/*.changes; then
+if sudo -u nobody diffoscope --text $BUILDDIR/diffoscope.txt --html $BUILDDIR/diffoscope.html /tmp/initial_build/*.changes $BUILDDIR/*.changes; then
 	print_reproducible
-	rm -f /tmp/buildd/diffoscope.{txt,html}
+	rm -f $BUILDDIR/diffoscope.{txt,html}
 fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list