From 033f359f5c65ae02d81410320c0f2f77ea54ff3b Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Thu, 19 May 2011 21:46:50 +0200 Subject: git-pbuilder: Distinguish 1.0 and 3.0 source format and set exclude pattherns for the 1.0 format. Otherwise the build fails since dpkg-source tries to include .git. --- git-pbuilder | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/git-pbuilder b/git-pbuilder index b8adcf5f..b18b7a8c 100755 --- a/git-pbuilder +++ b/git-pbuilder @@ -98,10 +98,17 @@ update|create|login) ;; esac +if [ ! -f debian/source/format ] || grep -qs "^1.0" debian/source/format; then + echo "Source format 1.0 detected, adding excludes" + DEBBUILDOPTS="-i'(?:^|/)\\.git(attributes)?(?:\$|/.*\$)' -I.git $*" +else + DEBBUILDOPTS="$*" +fi + # Now we can finally run pdebuild. The quoting here is tricky, but this # seems to pass everything through properly. pdebuild --buildresult .. --pbuilder cowbuilder \ - --debbuildopts "$*" \ + --debbuildopts "$DEBBUILDOPTS" \ -- --basepath "$BASE" $OPTIONS if [ -n "`ls ../*_source.changes`" ] ; then rm ../*_source.changes -- cgit v1.2.3