Sed scripts to generate package version

Asked by Javier Collado on 2011-04-20

In the case in which the package requires a more advanced new version generation, it would be nice to be able to provide a small sed script that takes as input the version in debian/changelog and prints the new version with substitution variables as output.

For example, if the version is something like:
0.2-0ubuntu1

and it's expected to replace ubuntu with the target distribution (see question #153569) and the branch revision number is to be added as suffix, a sed script like the following would do the job:
s/ubuntu/{distro}/;s/$/~rev{revno}/

Question information

Language:
English Edit question
Status:
Solved
For:
bzr-builder Edit question
Assignee:
No assignee Edit question
Solved by:
Jelmer Vernooij
Solved:
2011-04-27
Last query:
2011-04-27
Last reply:
2011-04-27

I've tried a couple of recipes and I've seen that the target distribution is added anyway to the changelog version. Anyway, I'd like
have more control on this so that I can add it to whatever place I prefer (not necessarily at the end).

Best Jelmer Vernooij (jelmer) said : #2

I've linked the related bug report which asks for a bit more than this question but would cover this use case as well.

Thanks Jelmer Vernooij, that solved my question.