tech-pkg archive

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

Re: regexp for correct package version



> On Tue, Feb 12, 2008 at 10:31:20PM +0100, Joerg Sonnenberger wrote:
 >> On Tue, Feb 12, 2008 at 11:10:04PM +0200, Aleksey Cheusov wrote:
 >> > I need an algorithm of comparing package's versions.
 >> 
 >> It is called Dewey and badly documented. For the current implementation,
 >> see the source file of the same name in pkg_install.

> The ordering rules for the comparisons are documented in pkg_info(8).
> I'm not sure what could be done to make the documentation any better;
> otherwise I'd have done it. 

> Perhaps you could elaborate on what's lacking, and we could improve it?

dewey in pkg_info(1) looks like description, not like definition.

An easiest missed thing is a regular expression for correct package
version.  Is the following correct (ERE)?

[0-9]+([.][0-9]+)*((alpha|beta|rc|pre|pl)[0-9]+)?[a-z]?(nb[0-9]+)?

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index