Support package version found in branches when specifying version numbers in recipe

Bug #624094 reported by Mathias Gug
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Jelmer Vernooij
bzr-builder
Fix Released
Medium
Jelmer Vernooij

Bug Description

When writing a recipe to backport a package from the development release to a stable release, I'd like to be able to set the version number in the recipe to use the package version found in debian/changelog from one of the bzr branch.

Example:

In the development release, package foo has version 1.0-1. I'd like to create a recipe to build a backport of package foo for the stable release lucid which should have the following version: 1.0-1~lucid1.

I'd like to specify the version number in the recipe using a substitution variable so that I don't have to edit the recipe whenever there is a new version available in the development release:

  deb-version {pkgversion}~{release}1

Tags: lp-code recipe

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote :

So this is an alternative to {debupstream}?

tags: added: recipe
Changed in launchpad-code:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 624094] Re: Support package version found in branches when specifying version numbers in recipe

Excerpts from Aaron Bentley's message of Wed Aug 25 16:23:59 UTC 2010:
> So this is an alternative to {debupstream}?
>

Yes. IIUC given a package foo which version is 1.0-1, {debupstream} would
be 1.0. I'd like to be able to get 1.0-1 as well.

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

James Westby (james-w)
Changed in bzr-builder:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
janisozaur (janisozaur) wrote :

How about adding a substitution that could be filled in from within the build script?
Example:
specify revision number as "deb-version 0+{script:path/to/some/script}"
then while building "path/to/some/script" would be executed and stdout from it used as a substitution.

I would certainly like this option, I'm not sure there would be many use cases and if it wouldn't violate some constraints (you could limit this output to say [a-zA-Z0-9], 20 characters, one line).

Revision history for this message
Aaron Bentley (abentley) wrote :

Janisozaur, that would be arbitrary code execution, which we do not permit in the tree-building step.

Revision history for this message
janisozaur (janisozaur) wrote :

That's what I though. How about postponing substitution until the build stage?

Revision history for this message
Aaron Bentley (abentley) wrote :

We don't want to postpone substitution because we want to be able to determine whether to abort the build after building the tree, and one reason for aborting the build is because a build with that debversion has already been uploaded. Postponing substitution would break such tests.

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

I think this should be called

  {debversion}

and also allow specifying a branch to read debian/changelog from, defaulting to the resulting
tree I guess.

Maybe debupstream et. al. should also take that parameter?

Thanks,

James

Jelmer Vernooij (jelmer)
Changed in bzr-builder:
status: Triaged → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I've submitted an MP for this.

Allowing non-base branches to also support this variable is not trivial, I'll file a separate bug about that. Once we do it for {debversion} it should be easy to also do it for {debupstream} and {debupstream-base} though.

Jelmer Vernooij (jelmer)
Changed in bzr-builder:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-builder:
milestone: none → 0.7
Jelmer Vernooij (jelmer)
Changed in bzr-builder:
status: Fix Committed → Fix Released
Jelmer Vernooij (jelmer)
Changed in launchpad:
assignee: nobody → Jelmer Vernooij (jelmer)
status: Triaged → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

@jelmer is this still in-progress, or actually done?

Changed in launchpad:
importance: Medium → Low
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is waiting for a new bzr-builder to be deployed on the builders. RT: #46345

Revision history for this message
Martin Pool (mbp) wrote :

The new bzr and bzr-builder are now deployed so this should be fixed.

Changed in launchpad:
status: In Progress → 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.