[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Git Package Versioning



On Sun, 20 Mar 2011 22:25:38 +0100, Joachim Wiedorn <ad_debian@joonet.de>
wrote:
> Julien Valroff <julien@debian.org> wrote on 2011-03-20 21:48:
> 
> > The best I have found is to use something like:
> > <latest_upstream_release>+gitYYYYMMDD.<githash>
> 
> Please be aware, that "+" is not the optimal connector.
> Try dpkg --compare-versions and see:
> 
> a)   1.2.0  is less than  1.2.0+git2011
> 
> b)   1.2.0  is greater than  1.2.0~git2011
> 
> The version b) is the better way. So please use "~" 
> as connector.

Except that Julien did mention using the latest upstream release version,
which implies that the git hash is later than the upstream release, so '+' is
correct... Here's an example with a timeline:

  |
  |  1.2.0 is released (if packaged, version 1.2.0-1 or whatever)
  |
  |  new Debian package version, including git changes since 1.2.0
  |
  |  1.2.1 is released
  |
  V

In this example, the Debian package version could be either
1.2.0+gitYYYYMMDD.<githash>-1, which could be read as "everything in the
1.2.0 release plus all changes since, up to git hash <...> on YYYYMMDD", or
1.2.1~gitYYYYMMDD.<githash>-1, which could be read as "the 1.2.1 release
currently being prepared, as of git hash <...> on YYYYMMDD". Which you choose
would depend on whether you're packaging the release plus some fixes, or
you're packaging a preview of the next release...

Regards,

Stephen


Reply to: