aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-05-19 21:46:50 +0200
committerGuido Günther <agx@sigxcpu.org>2011-05-19 21:46:50 +0200
commit033f359f5c65ae02d81410320c0f2f77ea54ff3b (patch)
tree1f9ce7b13dbee88278308cc6bc8aa048e0057923
parent91090de2f25de138df69e1f622ee1722bca40f30 (diff)
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.
-rwxr-xr-xgit-pbuilder9
1 files changed, 8 insertions, 1 deletions
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