Hi Otto,
On Wed, Jul 20, 2016 at 09:50:19PM +0300, Otto Kekäläinen wrote:
> 2016-07-20 15:26 GMT+03:00 Guido Günther <a...@sigxcpu.org>:
> >> I'd wish there was a option like 'git-dch --unreleased' which simply
> >> added to the changelog an empty entry with the Debian revision
> >> incremented by one and target set to UNRELEASED.
> >>
> >> Then I could work as normally and not commit any snapshot commits, but
> >> instead only generate snapshots at build time in my own build array or
> >> as Launchpad does it. When all changes are done I'd like to run
> >> 'git-dch --release' which would remove the temporary empty entry and
> >> replace it with the normal git-buildpackage automatic changelog entry.
> >
> > As discussed offline this sound reasonable. What I currently dislike is
> > that we have a -1 debian revision by default. This makes it hard to
> > build several candidates with ever increasing version numbers (but
> > smaller than the release). Can you explain how you generate "snapshots
> > at build time" as said above to avoid this problem?
> 
> Here you can see examples of what kind of build time revision strings
> I currently do:
> https://launchpad.net/~mysql-ubuntu/+archive/ubuntu/mariadb-10.0/+builds?build_text=&build_state=all
> 
> eg.
> mariadb-10.0 10.0.25-1~wily1~1462369045.5e6871b
> mariadb-10.0 10.0.25-1~wily1~1462377937.cd44cde
> mariadb-10.0 10.0.25-1~wily1~1462383653.d02b248
> 
> After I imported upstream 10.0.25, I had in the changelog 10.0.25-1 
> UNRELEASED.
> All builds add a tilde so that the extra part after the revision is
> smaller than the final release, eg. 10.0.25-1~example on any test
> machine will later upgrade to 10.0.25-1 when it is available via
> official channels.
> 
> In this example after the tilde I have the distro pocket name, Unix
> epoch and git commit id. The distro pocket name is for convenience
> when I make test builds for multiple distro series. The unix timestamp
> makes sure any later release has a bigger revision number then a
> previous one, and the final git commit makes it easy for me to
> correlate potential failed builds to particular commits in my git log.
> 
> My build system automatically adds the '~wily1~1462383653.d02b248'
> part for every build. Only thing that git-buildpackage should do, is
> support automatic or at least semi-automatic creation of a new empty
> changelog entry with Debian revision +1 (or complete new version
> number after import-orig) and distro series "UNRELEASED".

O.k. so we would use a Debian revision of 1 and squash changelog entries
under that revision until one makes a release. Snapshot builds would get
a lower version number (e.g. as currently implemented). After the
release of version 1 we then need to automatically add a section with 2
and UNRELEASED and so on.

In case of a new upstream version we need to check if the last entry is
unreleased and in this case rewrite the version number with
upstream-version and Debian revision 1. If it is not unreleased we
simply add a new section.

I'm not making any promises when I will get around to work on this
(before next Debconf) but is sounds reasonable since it makes it more
obvious from the changelog what will be the next release version.

Cheers,
 -- Guido

Reply via email to