On Sun, 21 Oct 2007 23:13:58 +0100
Steve Long <[EMAIL PROTECTED]> wrote:

> Marius Mauch wrote:
> > But like name_splitted.cpp is buggy as it assumes that a dash
> > followed by a digit starts the version part. See
> >   echo ${PORTDIR}/*-*/* | tr ' ' '\n' | grep '\-[[:digit:]]'
> > for some names that break the assumption.
> >
> Whoops :S Guess I need to change that then :)
>  
> > And no clue what that cvs stuff is supposed to do, as there are no
> > packages using that naming pattern, and the (unused) cvs versioning
> > extension in portage-2.1 also uses a different pattern.
> > 
> Well the line from portage_versions.py is:
> ver_regexp = re.compile("^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|
> p|beta
> alpha|rc)\\d*)*)(-r(\\d+))?$")
> - which means that a version begins with either a digit or cvs
> followed by digit.

Not precisely: a digit, or "cvs" followed by a dot and a digit (you got
it right in the following, but not in the code posted earlier)

> We represented this in bash (for verCompare) as:
> ver='^(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta|alpha|rc)
> [0-9]*)* (-r([0-9]+))?$'
> 
> I think we can use:
> CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta
> alpha|rc)[0-9]*)*)(-r([0-9.]+))?$'

Well, categories don't necessarily have to contain a dash (though all
official ones do currently).

Marius
-- 
[EMAIL PROTECTED] mailing list

Reply via email to