aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2009-12-12 16:06:08 +0100
committerLoïc Minier <lool@dooz.org>2009-12-12 16:06:08 +0100
commit4639b8e84cf47899655bbe9f04279493ed99ee01 (patch)
tree33172b1b9399c6b3ae1b67c14d2b67a070eaa423
parent070f8c798b9b2d98ef98a8407b8812ce9ab745ad (diff)
downloadpbuilder-4639b8e84cf47899655bbe9f04279493ed99ee01.tar
pbuilder-4639b8e84cf47899655bbe9f04279493ed99ee01.tar.gz
Make --debbuildopts additive
Change --debbuildopts to be additive and reset the list of options to the empty list if --debbuildopts "" is passed. Update docs and add NEWS entry.
-rw-r--r--debian/NEWS6
-rwxr-xr-xpbuilder-checkparams4
-rw-r--r--pbuilder.89
-rw-r--r--pbuilderrc.55
-rw-r--r--pdebuild4
-rw-r--r--pdebuild-checkparams2
-rw-r--r--pdebuild-internal4
-rw-r--r--pdebuild-uml-checkparams2
-rw-r--r--pdebuild-user-mode-linux2
-rw-r--r--pdebuild-user-mode-linux.13
-rw-r--r--pdebuild.14
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;
;;
diff --git a/pbuilder.8 b/pbuilder.8
index 64b6e29..3db2252 100644
--- a/pbuilder.8
+++ b/pbuilder.8
@@ -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
diff --git a/pdebuild b/pdebuild
index 3c3454b..d58e40b 100644
--- a/pdebuild
+++ b/pdebuild
@@ -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"
diff --git a/pdebuild.1 b/pdebuild.1
index 2a53815..3798e00 100644
--- a/pdebuild.1
+++ b/pdebuild.1
@@ -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.