Subject: Re: how to handle non-successive package versions ?
To: None <tech-pkg@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 08/31/2005 12:37:15
> On Tue, Aug 23, 2005 at 10:08:35PM +0200, Geert Hendrickx wrote:
> > a while ago, I committed texmaker (a LaTeX IDE) to pkgsrc-wip.  It was
> > then at version 1.12.  Two newer versions have been released since then,
> > but they're called 1.2 and 1.2.1.  
> > 
> > I'd expect pkgsrc update scripts will get confused if I just use the
> > DISTNAME of the updated package, so how should I handle this?  

FreeBSD "ports" addresses this issue by adding an "epoch" to the package
version.  The "epoch" gets incremented whenever the numbering would
otherwise appear to go backwards.  Look for PORTEPOCH in FreeBSD's
bsd.port.mk to see how they do it.  The epoch appears as the last item
in the printable package name (delimited by a comma), but sorts as the
most significant part of the version number.

For example, one would go from something like this:

	PKGVERSION=1.12
	PKGNAME=texmaker-1.12

to something like this:

	PKGVERSION=1.2
	PKGEPOCH=1	# numbering went backwards from 1.12 to 1.2
	PKGNAME=texmaker-1.2,1

--apb (Alan Barrett)