Auto supply -v<last ubuntu version> for bzr bd -S?

Bug #788349 reported by Barry Warsaw
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Distributed Development
New
Undecided
Unassigned

Bug Description

I just uploaded a change to python-numpy which actually consisted of two changelog entries, one for the merge from Debian, and the second for the Ubuntu-specific changes we're still carrying forward. I received this feedback from an Ubuntu developer:

On 05/25/2011 10:20 PM, Barry Warsaw wrote:
> python-numpy (1:1.5.1-2ubuntu1) oneiric; urgency=low
>
> * Merge from Debian unstable, remaining changes:
> debian/patches/20_disable-plot-extension.patch
> - Disable plot_directive extension, and catch ImportErrors when
> matplotlib cannot be imported, which allows us to remove
> python-matplotlib from dependencies. This is required because
> python-numpy is in main, while python-matplotlib is in universe.
>
> Date: Wed, 25 May 2011 15:52:10 -0400
> Changed-By: Barry Warsaw<email address hidden>
> Maintainer: Ubuntu Developers<email address hidden>
> Signed-By: Barry Warsaw<email address hidden>
> https://launchpad.net/ubuntu/oneiric/+source/python-numpy/1:1.5.1-2ubuntu1
>

please use -v<last ubuntu version> to build the package, so that all the changelog entries appear in the emails.

By this I think the responder is saying that dpkg-genchanges -v<last ubuntu version> should find its way down the rabbit hole from bzr bd -S. That makes sense in this case since there's an intervening non-Ubuntu changelog in between two Ubuntu changelog entries.

Of course, it would be nice if bzr bd could do this for you, so you don't have to remember to do it, and so that you can't mess it up. I *think* bzr should be able to figure out the last Ubuntu version by looking at the tags. If the last version was not an Ubuntu version, then it should be possible to automatically supply -v to dpkg-buildsource, which forwards it to dpkg-genchanges.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 788349] [NEW] Auto supply -v<last ubuntu version> for bzr bd -S?

On Wed, 25 May 2011 21:26:00 -0000, Barry Warsaw <email address hidden> wrote:
> Of course, it would be nice if bzr bd could do this for you, so you
> don't have to remember to do it, and so that you can't mess it up. I
> *think* bzr should be able to figure out the last Ubuntu version by
> looking at the tags. If the last version was not an Ubuntu version,
> then it should be possible to automatically supply -v to dpkg-
> buildsource, which forwards it to dpkg-genchanges.

Hi,

It's not possible for bzr-builddeb to reliably detect this. Check out
the --package-merge option. Try using this when you are building the
package in the situation you describe.

Thanks,

James

Revision history for this message
Barry Warsaw (barry) wrote :

Hi James,

On May 25, 2011, at 10:08 PM, James Westby wrote:

>On Wed, 25 May 2011 21:26:00 -0000, Barry Warsaw <email address hidden> wrote:
>> Of course, it would be nice if bzr bd could do this for you, so you
>> don't have to remember to do it, and so that you can't mess it up. I
>> *think* bzr should be able to figure out the last Ubuntu version by
>> looking at the tags. If the last version was not an Ubuntu version,
>> then it should be possible to automatically supply -v to dpkg-
>> buildsource, which forwards it to dpkg-genchanges.
>
>It's not possible for bzr-builddeb to reliably detect this. Check out
>the --package-merge option. Try using this when you are building the
>package in the situation you describe.

I just tried this on python-support, where we have 1.0.10ubuntu3 and I'm
merging up to Debian's 1.0.13 with an additional 1.0.13ubuntu1 to keep our
Ubuntu specific changes. Looking in the _source.changes file, I see the
changelog entries for

1.0.13ubuntu1
1.0.13
1.0.12
1.0.11

which I think makes sense, given that the next change down is 1.0.10ubuntu3.

So it looks like --package-merge is doing what I want, but I'm curious. Why
is it not possible to reliably detect this? Does it make sense to always
provide --package-merge or will that do bad things in some cases?

Also, the help docs are only somewhat helpful:

  --package-merge Build using the appropriate -v and -sa options for
                        merging in the changes from another source.

Okay, I understand what the first half of that means, but what does "merging
in the changes from another source" actually *mean*? ;)

If it's really not possible for bd to always DTRT, how can we improve both the
help text and discoverability of this option?

Cheers,
-Barry

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Thu, 2011-05-26 at 18:49 +0000, Barry Warsaw wrote:
> On May 25, 2011, at 10:08 PM, James Westby wrote:
>
> >On Wed, 25 May 2011 21:26:00 -0000, Barry Warsaw <email address hidden> wrote:
> >> Of course, it would be nice if bzr bd could do this for you, so you
> >> don't have to remember to do it, and so that you can't mess it up. I
> >> *think* bzr should be able to figure out the last Ubuntu version by
> >> looking at the tags. If the last version was not an Ubuntu version,
> >> then it should be possible to automatically supply -v to dpkg-
> >> buildsource, which forwards it to dpkg-genchanges.
> >
> >It's not possible for bzr-builddeb to reliably detect this. Check out
> >the --package-merge option. Try using this when you are building the
> >package in the situation you describe.
>
> I just tried this on python-support, where we have 1.0.10ubuntu3 and I'm
> merging up to Debian's 1.0.13 with an additional 1.0.13ubuntu1 to keep our
> Ubuntu specific changes. Looking in the _source.changes file, I see the
> changelog entries for
>
> 1.0.13ubuntu1
> 1.0.13
> 1.0.12
> 1.0.11
>
> which I think makes sense, given that the next change down is
> 1.0.10ubuntu3.
>
> So it looks like --package-merge is doing what I want, but I'm curious. Why
> is it not possible to reliably detect this? Does it make sense to always
> provide --package-merge or will that do bad things in some cases?
My guess is that perhaps it doesn't work properly if there are a few
entries in a Debian package that have not been uploaded (e.g. new
upstream releases for which a changelog entry exists).

Does --package-merge back off if -v was specified manually?

Cheers,

Jelmer

Revision history for this message
James Westby (james-w) wrote :

On Tue, 07 Jun 2011 13:33:50 -0000, Jelmer Vernooij <email address hidden> wrote:
> > So it looks like --package-merge is doing what I want, but I'm curious. Why
> > is it not possible to reliably detect this? Does it make sense to always
> > provide --package-merge or will that do bad things in some cases?
> My guess is that perhaps it doesn't work properly if there are a few
> entries in a Debian package that have not been uploaded (e.g. new
> upstream releases for which a changelog entry exists).

The case I think I had in mind was Debian merging from Ubuntu (including
changelog), Ubuntu syncing, and then Ubuntu going to make a change. The
changelog would be

  1-2 unstable
  1-1ubuntu1 oneiric

--package-merge would then see this as Ubuntu merging from Debian and
  add the wrong -v.

There are probably other situations you can point to.

Of course the failure mode is never really that bad.

Perhaps by looking at tags on mainline revisions as well we could avoid
e.g the case that I describe, but I don't know if that will be fragile
given the sorts of things that people might do.

> Does --package-merge back off if -v was specified manually?

No, but it probably should.

Thanks,

James

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.