[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible Debian: improve src_dir variation

Holger Levsen holger at layer-acht.org
Mon Nov 7 15:54:54 UTC 2016


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 1494ae459559e284fe0faf2185c9e241398d604b
Author: HW42 <hw42 at ipsumj.de>
Date:   Mon Nov 7 16:24:47 2016 +0100

    reproducible Debian: improve src_dir variation
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build.sh                                           | 3 ++-
 hosts/bbx15-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/bpi0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/cb3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/cbxi4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 6 ++----
 hosts/cbxi4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 hosts/ff2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/ff2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/ff4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/hb0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir    | 6 ++----
 hosts/jenkins-test-vm/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 6 ++----
 hosts/jenkins/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir         | 6 ++----
 hosts/jtk1a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/odu3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/odxu4-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 6 ++----
 hosts/odxu4c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 6 ++----
 hosts/opi2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/opi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/opi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir                   | 6 ++----
 hosts/rpi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/rpi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir  | 6 ++----
 hosts/wbd0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 hosts/wbq0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir   | 6 ++----
 32 files changed, 64 insertions(+), 125 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 2349cdc..b730d4c 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -655,7 +655,8 @@ umask 0002
 EOF
 	# build path is not yet varied on testing
 	if [ "${SUITE}" != "testing" ]; then
-		echo "BUILDDIR=/build/2nd" >> "$TMPCFG"
+		local src_dir_name="$(perl -mDpkg::Source::Package -e '$_ = Dpkg::Source::Package->new(filename => $ARGV[0])->get_basename; s/_/-/g; print' -- "${SRCPACKAGE}_${EVERSION}.dsc")"
+		echo "BUILDDIR=/build/$src_dir_name" >> "$TMPCFG"
 	else
 		echo "BUILDDIR=/build" >> "$TMPCFG"
 	fi
diff --git a/hosts/bbx15-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/bbx15-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/bbx15-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/bbx15-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/bpi0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/bpi0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/bpi0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/bpi0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/cb3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/cb3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/cb3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/cb3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/cbxi4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/cbxi4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/cbxi4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/cbxi4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/cbxi4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/cbxi4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/cbxi4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/cbxi4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/cbxi4pro0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/cbxi4pro0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/cbxi4pro0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/cbxi4pro0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/ff2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/ff2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/ff2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/ff2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/ff2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/ff2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/ff2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/ff2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/ff4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/ff4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/ff4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/ff4a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/hb0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/hb0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/hb0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/hb0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/jenkins-test-vm/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/jenkins-test-vm/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/jenkins-test-vm/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/jenkins-test-vm/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/jenkins/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/jtk1a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/jtk1a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/jtk1a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/jtk1a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/odu3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/odu3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/odu3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/odu3a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/odxu4-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/odxu4-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/odxu4-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/odxu4-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/odxu4c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/odxu4c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/odxu4c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/odxu4c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/opi2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/opi2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/opi2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/opi2a-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/opi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/opi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/opi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/opi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/opi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/opi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/opi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/opi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build1-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build10-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build10-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build10-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build10-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build11-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build11-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build11-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build11-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build15-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build15-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build15-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build15-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build2-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build2-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build2-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build2-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build5-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build5-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build5-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build5-amd64/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/profitbricks-build6-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/profitbricks-build6-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/profitbricks-build6-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/profitbricks-build6-i386/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/rpi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/rpi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/rpi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/rpi2b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/rpi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/rpi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/rpi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/rpi2c-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/wbd0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/wbd0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/wbd0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/wbd0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd
diff --git a/hosts/wbq0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/wbq0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
index 7750fdf..9225116 100755
--- a/hosts/wbq0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
+++ b/hosts/wbq0-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir
@@ -7,7 +7,7 @@ set -e
 
 cd $BUILDDIR
 
-if [ "$(basename $(pwd))" != "2nd" ]; then
+if [ "$PWD" == "/build" ]; then
 	# build path variation disabled, so do nothing
 	exit 0
 fi
@@ -15,6 +15,4 @@ fi
 # There should be only one file, the source directory.
 src_dir=$(ls | head -n 1)
 
-# We want to keep the build path length to minimise the diff. So we just
-# replace the first char of the source dir.
-mv $src_dir _${src_dir:1}
+mv $src_dir 2nd

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