pdebuild host --debbuildopts inherited by target pbuild

Bug #326216 reported by TJ
6
Affects Status Importance Assigned to Milestone
pbuilder (Debian)
Fix Released
Unknown
pbuilder (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pbuilder

This is a latent bug, exposed as a by-product of the fix I created for bug #278213 "Does not accept multiple --debbuildopts options" which resulted in "pbuilder (0.181ubuntu6)".

The problem is that when using pdebuilder and passing --debbuildopts to both 'sides' (host and target), the target pbuilder dpkg-source incorrectly inherits the host --debbuildopts.

For example:

 HOST_DEB_OPTIONS="--debbuildopts -i -I"
 PBUILDER_DEB_OPTIONS="--debbuildopts -Idebian/dpkg-source.excludes"
 pdebuild --logfile $LOGNAME ${HOST_DEB_OPTIONS} -- ${PBUILDER_DEB_OPTIONS}

results in the inner dpkg-source seeing:

 dpkg-source -i -I -Idebian/dpkg-source.excludes -b kvm-83+dfsg

Which in Hardy and later isn't a problem (since -I is acceptable to dpkg-source >= v1.14.7). However, if working on back-porting a package to Gutsy or Feisty or Edgy the versions of dpkg-source in those releases do not understand the -I option without a file specification (-I<exclusion.list>).

This will cause the target pbuild to fail since the source can't be extracted.

This wouldn't have come to light if it wasn't for my desire to back-port some packages for use on long-lived servers that are running stable older releases. In these cases my build_test script generates two different sets of --debbuildopts for the host (more recent) and target (older) dpkg-source.

The builds were failing and as can be seen in the example above it is because the host's --debbuildopts are passing to the target.

Patches to follow.

TJ (tj)
description: updated
Revision history for this message
TJ (tj) wrote :

It would be helpful to backport this change to Intrepid and Hardy since they have received automated backports of the recent Jaunty package.

Revision history for this message
TJ (tj) wrote :
Changed in pbuilder:
status: Unknown → New
Changed in pbuilder (Debian):
status: New → Confirmed
Revision history for this message
Loïc Minier (lool) wrote :

Could you try with the latest pbuilder, 0.196? It supports resetting the debbuildopts, but still works as before for the default case.

So you would use:
pdebuild --debbuildopts foo
to pass foo to both host and guest and:
pdebuild --debbuildopts foo -- --debbuildopts "" --debbuildopts bar
to pass foo to host and bar to guest and
pdebuild -- --debbuildopts bar
to pass nothing to host and bar to guest.

Let me know if that fixes the bug for you.

David Futcher (bobbo)
tags: added: patch-forwarded-debian
Revision history for this message
Maarten Bezemer (veger) wrote :

As asked before: It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 326216 and any other logs that are relevant for this particular issue.

Changed in pbuilder (Ubuntu):
status: New → Incomplete
Changed in pbuilder (Debian):
status: Confirmed → New
Revision history for this message
Mattia Rizzolo (mapreri) wrote : Re: Bug#514358: pdebuild host --debbuildopts inherited by target pbuild

tag 514358 wontfix
thanks
 status invalid

On Mon, Feb 09, 2009 at 12:02:03AM +0900, Junichi Uekawa wrote:
> IMO, That's a feature, not a bug.

me too.

> I don't want to accept this patch.

Me neither.

--
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
more about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-

Changed in pbuilder (Ubuntu):
status: Incomplete → Invalid
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.