Bug#501390: Does not accept multiple --debbuildopts options
TJ
ubuntu at tjworld.net
Tue Oct 7 06:05:47 UTC 2008
Package: pbuilder
Version: 0.176ubuntu2
Severity: normal
Tags: patch
--- Please enter the report below this line. ---
(originally reported as https://bugs.launchpad.net/ubuntu/+source/pbuilder/+bug/278213)
pbuilder and pdebuild do not accept or cope with multiple
--debbuildopts. For example (slightly nonsensical example):
HOST_DEB_OPTIONS="--debbuildopts -i -I"
PBUILDER_DEB_OPTIONS="--debbuildopts -i -I"
pdebuild --logfile $LOGNAME ${HOST_DEB_OPTIONS} -- ${PBUILDER_DEB_OPTIONS}
Command line parameter [-I] is not a valid .dsc file name
Impact: Passing multiple debbuildopts through pbuilder/pdebuild results
in the dpkg-source and other devscripts either failing or not using the
specified options (especially problematic when wanting to prevent VCS
files being included (-i -I).
Testcase: Using a source package that has VCS directories
(i.e. ./.git/ ) and "pbuilder ... --debbuildopts -i -I" or "pbuilder ...
--debbootopts -i --debbuildopts -I" results in an error in the first
case, or dpkg-buildpackage reporting a problem for every VCS file in the
latter (since -i was replaced by -I).
The cause is the three helper shell function libraries:
/usr/lib/pbuilderpbuilder-checkparams
/usr/lib/pbuilder/pdebuild-checkparams
/usr/lib/pbuilder/pdebuild-uml-checkparams
because they are coded to only accept one option, and to over-write any
previous option:
--debbuildopts)
DEBBUILDOPTS="$2";
shift; shift;
;;
The solution is to use:
DEBBUILDOPTS="$DEBBUILDOPTS $2";
As a by-product, this change allows the script to accept and use any
options exported to the environment before the tool starts.
--- System information. ---
Architecture: amd64
Kernel: Linux 2.6.24-21-generic
Debian Release: lenny/sid
500 hardy-updates gb.archive.ubuntu.com
500 hardy-security security.ubuntu.com
500 hardy-backports gb.archive.ubuntu.com
500 hardy wine.budgetdedicated.com
500 hardy gb.archive.ubuntu.com
500 hardy archive.canonical.com
--- Package information. ---
Depends (Version) | Installed
=============================-+-=============
coreutils (>= 4.5.8-1) | 6.10-3ubuntu2
debianutils (>= 1.13.1) | 2.28.2-0ubuntu1
debootstrap | 1.0.9~hardy1
OR cdebootstrap |
gcc | 4:4.2.3-1ubuntu6
wget | 1.10.2-3ubuntu1
--- debdiff (Ubuntu-specific changelog entry) ---
diff -Nru pbuilder-0.181ubuntu5/debian/changelog pbuilder-0.181ubuntu6/debian/changelog
--- pbuilder-0.181ubuntu5/debian/changelog 2008-08-21 11:30:35.000000000 +0100
+++ pbuilder-0.181ubuntu6/debian/changelog 2008-10-04 18:46:47.000000000 +0100
@@ -1,3 +1,9 @@
+pbuilder (0.181ubuntu6) intrepid; urgency=low
+
+ * Fix: correctly handle multiple --debbuildopts (LP: #278213).
+
+ -- TJ <ubuntu at tjworld.net> Sat, 4 Oct 2008 18:30:00 +0200
+
pbuilder (0.181ubuntu5) intrepid; urgency=low
* Fix condition that makes build twice in a row the default behavior.
diff -Nru pbuilder-0.181ubuntu5/pbuilder-checkparams pbuilder-0.181ubuntu6/pbuilder-checkparams
--- pbuilder-0.181ubuntu5/pbuilder-checkparams 2008-08-04 10:34:27.000000000 +0100
+++ pbuilder-0.181ubuntu6/pbuilder-checkparams 2008-10-04 18:45:22.000000000 +0100
@@ -137,7 +137,7 @@
shift; shift;
;;
--debbuildopts)
- DEBBUILDOPTS="$2";
+ DEBBUILDOPTS="$DEBBUILDOPTS $2";
shift; shift;
;;
--logfile)
diff -Nru pbuilder-0.181ubuntu5/pdebuild-checkparams pbuilder-0.181ubuntu6/pdebuild-checkparams
--- pbuilder-0.181ubuntu5/pdebuild-checkparams 2008-05-24 23:54:05.000000000 +0100
+++ pbuilder-0.181ubuntu6/pdebuild-checkparams 2008-10-04 18:45:42.000000000 +0100
@@ -42,7 +42,7 @@
shift; shift;
;;
--debbuildopts)
- DEBBUILDOPTS="$2";
+ DEBBUILDOPTS="$DEBBUILDOPTS $2";
shift; shift;
;;
--configfile)
diff -Nru pbuilder-0.181ubuntu5/pdebuild-uml-checkparams pbuilder-0.181ubuntu6/pdebuild-uml-checkparams
--- pbuilder-0.181ubuntu5/pdebuild-uml-checkparams 2008-05-24 23:54:05.000000000 +0100
+++ pbuilder-0.181ubuntu6/pdebuild-uml-checkparams 2008-10-04 18:46:00.000000000 +0100
@@ -66,7 +66,7 @@
shift;
;;
--debbuildopts)
- DEBBUILDOPTS="$2";
+ DEBBUILDOPTS="$DEBBUILDOPTS $2";
shift; shift;
;;
--buildresult)
More information about the Pbuilder-maint
mailing list