Does not accept multiple --debbuildopts options

Bug #278213 reported by TJ
4
Affects Status Importance Assigned to Milestone
pbuilder (Debian)
Fix Released
Unknown
pbuilder (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Hardy by TJ
Nominated for Intrepid by TJ

Bug Description

Binary package hint: pbuilder

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

The cause is the two 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.

Related branches

Revision history for this message
TJ (tj) wrote :

SRU Justification:

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 a tar.gz file that includes the VCS files in the latter.

The fix enables all debbuildopts to be set and the package sources created correctly.

Revision history for this message
TJ (tj) wrote :
Changed in pbuilder:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
TJ (tj) wrote :

Correction to Hardy SRU Justification:

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).

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, TJ, I'll sponsor this for intrepid. Can you please submit that as a Debian bug, too, so that the behaviour of pbuilder won't diverge between Debian and Ubuntu? Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pbuilder - 0.181ubuntu6

---------------
pbuilder (0.181ubuntu6) intrepid; urgency=low

  * Fix: correctly handle multiple --debbuildopts (LP: #278213).

 -- TJ <email address hidden> Sat, 4 Oct 2008 18:30:00 +0200

Changed in pbuilder:
status: Triaged → Fix Released
Changed in pbuilder:
status: Unknown → New
Changed in pbuilder (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.