pdebuild overrides --buildresult

Bug #129586 reported by Robert Collins
4
Affects Status Importance Assigned to Milestone
pbuilder (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

 affects /ubuntu/pbuilder

pdebuild is meant to take pbuilder options after a --, according to the
help.

e.g.

pdebuild -- --buildresult /path/to/dir

and for most options, this works - e.g.
pdebuild -- --basetgz my-base.tgz

however, one option in particular does not work this way - --buildresult

if you do
pdebuild -- --buildresult /path/to/dir, then the parser in
/usr/lib/pbuilder/pdebuild-checkparams will see there is no
--buildresult in the pdebuild specific options, which leads to
BUILDRESULT="" being exported, this then is passed onto the pbuilder
command explicitly, *after* the supplied --buildresult, overriding it.

Changing this line in /usr/bin/pdebuild
    ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" --debbuildopts "${DEBBUILDOPTS}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc

To

    ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build --buildresult "${BUILDRESULT}" "$@" ${EXTRA_CONFIGFILE[@]/#/--configfile } --debbuildopts "${DEBBUILDOPTS}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc

Fixes it for me.

That is - move the --buildresult option before the "$@". Moving "$@" to
the end of the line would avoid all possible cases of that, but I
haven't thought deeply enough about the implications to predict side
effects.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 129586] pdebuild overrides --buildresult

actually, I'm fixing 'behaviour by design'.

If anyone cares, the UI here is bad: the option can be given in the
pbuilder options, and folk using generated options, such as using
pbuilder for several arches and distros at once, *will* be bitten by
this, even if they find it in the man page, its inconsistent and should
really be fixed.

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Fix included in debdiff for bug 123068.
I've moved the "$@" for both PDEBUILD_BUILDER calls to the end of the chain (well, just before the "--" for "internal" and before the .dsc arg for the case you've mentioned)

Changed in pbuilder:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pbuilder - 0.176ubuntu2

---------------
pbuilder (0.176ubuntu2) hardy; urgency=low

  [ Daniel Hahler ]
  * pbuilderrc: use "sudo -E" for PBUILDERROOTCMD (LP: #175776)
  * pbuilder-satisfydepends-gdebi: add "--force-yes" to apt-get call
    (LP: #123068)
  * pdebuild: Move "$@" to end of "arg chain" for PDEBUILD_BUILDER
    calls, so that "--buildresult" option gets passed to pbuilder
    (LP: #129586)

 -- Michael Vogt <email address hidden> Fri, 29 Feb 2008 12:49:35 +0100

Changed in pbuilder:
status: Triaged → 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.