From: Steve Long <slong@rathaus.eclipse.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Re: Re: repoman - I cannot handle it...
Date: Mon, 22 Oct 2007 08:24:04 +0100 [thread overview]
Message-ID: <ffhiuh$91c$1@ger.gmane.org> (raw)
In-Reply-To: 20071022033648.a22f18bf.genone@gentoo.org
Marius Mauch wrote:
> On Sun, 21 Oct 2007 23:13:58 +0100
> Steve Long <slong@rathaus.eclipse.co.uk> wrote:
>> 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)
>
Bleh, thanks: code review FTW! Sleep-loss er FTL :p
>> 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).
>
Ah OK, excellent!
^(([[:alpha:]]+-[[:alpha:]]+)|virtual)/.. and
^([[:alpha:]]+(-[[:alpha:]]+)?)/.. (if other single-terms are to be allowed)
- would add one to every subsequent term index (for the general case, not
when globbing the tree.)
If we can correctly reduce this to a single regex match, it'll make my life
a lot easier :)
(For update there's no need to check the category exists, since the strings
are taken from portage output, but such a check could be performed after
the match.)
--
gentoo-dev@gentoo.org mailing list
prev parent reply other threads:[~2007-10-22 7:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-20 12:45 [gentoo-dev] repoman - I cannot handle it Markus Rothe
2007-10-20 18:47 ` Zac Medico
2007-10-20 21:35 ` Markus Rothe
2007-10-20 21:55 ` Jeroen Roovers
2007-10-21 18:49 ` Markus Rothe
2007-10-21 21:42 ` [gentoo-dev] " Christian Faulhammer
2007-10-21 19:06 ` [gentoo-dev] " Ciaran McCreesh
2007-10-22 1:06 ` Jeroen Roovers
2007-10-22 1:18 ` Ciaran McCreesh
2007-10-21 10:44 ` [gentoo-dev] " Steve Long
2007-10-21 11:35 ` Marius Mauch
2007-10-21 13:08 ` Marijn Schouten (hkBst)
2007-10-21 14:49 ` Elias Pipping
2007-10-21 22:13 ` [gentoo-dev] " Steve Long
2007-10-22 1:36 ` Marius Mauch
2007-10-22 1:47 ` Ciaran McCreesh
2007-10-22 7:24 ` Steve Long [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ffhiuh$91c$1@ger.gmane.org' \
--to=slong@rathaus.eclipse.co.uk \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox