Re: PW#5-15: Package versions based on dates
On 13-Jan-1998 23:35:47, Mark Baker <firstname.lastname@example.org> wrote:
> On Tue, Jan 13, 1998 at 11:34:32PM +0100, Christian Schwarz wrote:
> > To prevent having to use epochs for every new upstream version,
> > the version number should be changed to the following format in
> > such cases: `96-05-01', `96-12-24', and starting with the year
> > 2000 `2000-12-24'.
> That will mean we'll need to use epochs for all these starting in 2000.
> Since we're going to need four digit years soon anyway, it would be better
> to use them now.
No, dpkg gets this right -- it compares numerically, not textually, if
steveg:~> dpkg --compare-versions 98May07 lt 98Dec07 ; echo $?
steveg:~> dpkg --compare-versions 1 lt 2 ; echo $?
steveg:~> dpkg --compare-versions 98-07-01 lt 98-08-01 ; echo $?
steveg:~> dpkg --compare-versions 98-07-01 lt 20-08-01 ; echo $?
steveg:~> dpkg --compare-versions 98-07-01 lt 2000-08-01 ; echo $?