diff options
-rwxr-xr-x | pbuilder-buildpackage | 2 | ||||
-rwxr-xr-x | pbuilder-checkparams | 2 | ||||
-rw-r--r-- | pdebuild-internal | 3 | ||||
-rw-r--r-- | pdebuild-uml-checkparams | 3 | ||||
-rwxr-xr-x | test_pbuilder-checkparams | 6 |
5 files changed, 9 insertions, 7 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 18678af..293eecf 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -33,7 +33,7 @@ fi; if [ -n "$BUILDUSERNAME" -a -n "$BUILDUSERID" ]; then SUTOUSER="env LOGNAME=$BUILDUSERNAME su -p $BUILDUSERNAME" - DEBBUILDOPTS="$DEBBUILDOPTS -rfakeroot" + DEBBUILDOPTS="${DEBBUILDOPTS:+$DEBBUILDOPTS }-rfakeroot" EXTRAPACKAGES="${EXTRAPACKAGES} fakeroot" log "I: using fakeroot in build." else diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 289ae38..37b8f42 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -143,7 +143,7 @@ while [ -n "$1" ]; do ;; --debbuildopts) # append to DEBBUILDOPTS or reset to empty if $2 isn't set - DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; + DEBBUILDOPTS="${2:+${DEBBUILDOPTS:+$DEBBUILDOPTS }$2}"; shift; shift; ;; --logfile) diff --git a/pdebuild-internal b/pdebuild-internal index 46511dc..4d07a48 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -46,7 +46,8 @@ function log() { while [ -n "$1" ]; do case "$1" in --debbuildopts) - DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; + # append to DEBBUILDOPTS or reset to empty if $2 isn't set + DEBBUILDOPTS="${2:+${DEBBUILDOPTS:+$DEBBUILDOPTS }$2}"; log "I: Setting DEBBUILDOPTS=$DEBBUILDOPTS" shift; shift; ;; diff --git a/pdebuild-uml-checkparams b/pdebuild-uml-checkparams index ea428a6..b78ae29 100644 --- a/pdebuild-uml-checkparams +++ b/pdebuild-uml-checkparams @@ -65,7 +65,8 @@ while [ -n "$1" ] ; do shift; ;; --debbuildopts) - DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; + # append to DEBBUILDOPTS or reset to empty if $2 isn't set + DEBBUILDOPTS="${2:+${DEBBUILDOPTS:+$DEBBUILDOPTS }$2}"; shift; shift; ;; --buildresult) diff --git a/test_pbuilder-checkparams b/test_pbuilder-checkparams index e514645..17392d4 100755 --- a/test_pbuilder-checkparams +++ b/test_pbuilder-checkparams @@ -14,11 +14,11 @@ expect_output "" \ test_debuildopts foo.dsc expect_output "" \ test_debuildopts --debbuildopts "" foo.dsc -expect_output " -v1.0 -efoo" \ +expect_output "-v1.0 -efoo" \ test_debuildopts --debbuildopts "-v1.0 -efoo" foo.dsc -expect_output " -v1.0 -efoo" \ +expect_output "-v1.0 -efoo" \ test_debuildopts --debbuildopts -v1.0 --debbuildopts -efoo foo.dsc -expect_output " -efoo" \ +expect_output "-efoo" \ test_debuildopts --debbuildopts -v1.0 --debbuildopts "" --debbuildopts -efoo foo.dsc testlib_summary |