diff options
-rw-r--r-- | debian/NEWS | 6 | ||||
-rwxr-xr-x | pbuilder-checkparams | 4 | ||||
-rw-r--r-- | pbuilder.8 | 9 | ||||
-rw-r--r-- | pbuilderrc.5 | 5 | ||||
-rw-r--r-- | pdebuild | 4 | ||||
-rw-r--r-- | pdebuild-checkparams | 2 | ||||
-rw-r--r-- | pdebuild-internal | 4 | ||||
-rw-r--r-- | pdebuild-uml-checkparams | 2 | ||||
-rw-r--r-- | pdebuild-user-mode-linux | 2 | ||||
-rw-r--r-- | pdebuild-user-mode-linux.1 | 3 | ||||
-rw-r--r-- | pdebuild.1 | 4 |
11 files changed, 29 insertions, 16 deletions
diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..cba27e6 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,6 @@ +pbuilder (0.195) unstable; urgency=low + + --debbuildopts is now additive and will append to pbuilderrc's DEBBUILDOPTS. + To reset the list of options, pass --debbuildopts "". + + -- Loïc Minier <lool@dooz.org> Sat, 12 Dec 2009 16:03:21 +0100 diff --git a/pbuilder-checkparams b/pbuilder-checkparams index ef81878..f8f02e8 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -142,7 +142,8 @@ while [ -n "$1" ]; do shift; shift; ;; --debbuildopts) - DEBBUILDOPTS="$2"; + # append to DEBBUILDOPTS or reset to empty if $2 isn't set + DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; shift; shift; ;; --logfile) @@ -173,6 +174,7 @@ while [ -n "$1" ]; do ;; --binary-arch) BINARY_ARCH="yes" + # XXX this might be overwriten by --debbuildopts "" DEBBUILDOPTS="${DEBBUILDOPTS} -B" shift; ;; @@ -319,11 +319,12 @@ target. .TP .BI "\-\-debbuildopts [" "options" "]" -List of options that are passed on to dpkg-buildpackage. Overrides -any value given in DEBBUILDOPTS as specified in -pbuilderrc. +List of options that are passed on to dpkg-buildpackage. Multiple flags are +additive and appended ot the any value given in DEBBUILDOPTS as specified in +pbuilderrc. To clear the list of options, pass the empty string, e.g. +\-\-debbuildopts "". -Multiple options are delimited with spaces, +Multiple options are delimited with spaces, like \-\-debbuildopts "-j100 -E" .TP diff --git a/pbuilderrc.5 b/pbuilderrc.5 index e307dc4..0983c4e 100644 --- a/pbuilderrc.5 +++ b/pbuilderrc.5 @@ -149,8 +149,9 @@ For details, see The options given here will be passed on to .BR dpkg-buildpackage . This can be useful e.g. for binary-only builds. The command-line option -.B "--debbuildopts" -overrides any contents specified here. +.B "--debbuildopts" will be appended to any contents specified here but +may also be used to reset the list of options. + The default value is to build source and binary package. .TP @@ -45,7 +45,7 @@ export BUILDRESULTUID=$(id -u) export BUILDRESULTGID=$(id -g) if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then - ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --execute ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) "$@" -- /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "${DEBBUILDOPTS}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD" + ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --execute ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) "$@" -- /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD" if [ -d "${BUILDRESULT}" ]; then for files in $(sed -rn '/^Files:/,${s/^ .* ([^ ]+)$/\1/p}' ../${CHANGES}); do cp -a ../"$files" "${BUILDRESULT}" @@ -60,7 +60,7 @@ else log "W: Unmet build-dependency in source" fi echo "dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | perl -pe 's/(^|\s)-[bB](\s|$)/$1$2/g' | /bin/bash - ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" --debbuildopts "${DEBBUILDOPTS}" "$@" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc + ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" "$@" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc fi # do signing with optional key specifier diff --git a/pdebuild-checkparams b/pdebuild-checkparams index e9a59af..8cd4563 100644 --- a/pdebuild-checkparams +++ b/pdebuild-checkparams @@ -42,7 +42,7 @@ while [ -n "$1" ]; do shift; shift; ;; --debbuildopts) - DEBBUILDOPTS="$2"; + DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; shift; shift; ;; --configfile) diff --git a/pdebuild-internal b/pdebuild-internal index 5b77a32..9c41931 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -46,8 +46,8 @@ function log() { while [ -n "$1" ]; do case "$1" in --debbuildopts) - log "I: Setting DEBBUILDOPTS=$2" - DEBBUILDOPTS="$2" + DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; + log "I: Setting DEBBUILDOPTS=$DEBBUILDOPTS" shift; shift; ;; --uid) diff --git a/pdebuild-uml-checkparams b/pdebuild-uml-checkparams index 39727a0..fea4ff2 100644 --- a/pdebuild-uml-checkparams +++ b/pdebuild-uml-checkparams @@ -66,7 +66,7 @@ while [ -n "$1" ] ; do shift; ;; --debbuildopts) - DEBBUILDOPTS="$2"; + DEBBUILDOPTS="${2:+$DEBBUILDOPTS $2}"; shift; shift; ;; --buildresult) diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux index 3e441df..c87aff0 100644 --- a/pdebuild-user-mode-linux +++ b/pdebuild-user-mode-linux @@ -41,7 +41,7 @@ if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then echo "E: Cannot find .. dir from PWD=$(pwd)" >&2 exit 1 fi - pbuilder-user-mode-linux execute "$@" --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "${DEBBUILDOPTS}" + pbuilder-user-mode-linux execute "$@" --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" else if ! dpkg-checkbuilddeps -B; then echo "W: Unmet build-dependency in source" >&2 diff --git a/pdebuild-user-mode-linux.1 b/pdebuild-user-mode-linux.1 index 058bdf6..cd2cc96 100644 --- a/pdebuild-user-mode-linux.1 +++ b/pdebuild-user-mode-linux.1 @@ -47,8 +47,9 @@ The configuration file is used, but not passed on to .BI "\-\-debbuildopts [" "options to pass to dpkg\-buildpackage" "]" The space-delimited list of options are passed to dpkg\-buildpackage. -This option overrides pbuilder option +This option appends to pbuilder option .B "\-\-debbuildopts" +and may also be used to reset the list of options by passing the empty string. .TP .BI "\-\-use\-pdebuild\-internal" @@ -73,8 +73,10 @@ The configuration file is used, and passed on to .BI "\-\-debbuildopts [" "options to pass to dpkg-buildpackage" "]" The space-delimited list of options are passed to dpkg-buildpackage. -This option overrides pbuilder option +This option appends to pbuilder option .B "\-\-debbuildopts" +and may also be used to reset the list of options by passing the empty +string. Multiple options are delimited with spaces. |