Don't delete *_source.changes on source only builds
authorGuido Günther <agx@sigxcpu.org>
Tue, 26 Aug 2014 09:08:27 +0000 (11:08 +0200)
committerJun Wang <junbill.wang@samsung.com>
Tue, 26 Jan 2016 15:59:40 +0000 (23:59 +0800)
Closes: #758726

bin/git-pbuilder

index 4024d12..37ffe67 100644 (file)
@@ -265,6 +265,7 @@ fi
 # them from the shell since they'll undergo another round of shell expansion
 # when the pbuilder runs debbuild.
 for arg in "$@" ; do
+    [ "$arg" != "-S" ] || source_only=true
     DEBBUILDOPTS+=" $(shell_quote "$arg")"
 done
 
@@ -278,7 +279,7 @@ else
         --debbuildopts "$DEBBUILDOPTS" -- "${OPTIONS[@]}"
 fi
 status="$?"
-if [ -n "`ls ../*_source.changes`" ] ; then
+if [ -n "`ls ../*_source.changes`" -a $source_only != 'true' ] ; then
     rm ../*_source.changes
 fi
 exit "$status"