From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ijrcl-0004H0-I5 for garchives@archives.gentoo.org; Mon, 22 Oct 2007 07:22:55 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9M7M5PY017337; Mon, 22 Oct 2007 07:22:05 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l9M7KAa8015027 for ; Mon, 22 Oct 2007 07:20:10 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id EE1E864E8F for ; Mon, 22 Oct 2007 07:20:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 required=5.5 tests=[AWL=0.526, BAYES_00=-2.599, RCVD_NUMERIC_HELO=2.067] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6OYr9YKQEc-Z for ; Mon, 22 Oct 2007 07:20:03 +0000 (UTC) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 122A764E98 for ; Mon, 22 Oct 2007 07:20:02 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IjrZs-0001xg-Mf for gentoo-dev@gentoo.org; Mon, 22 Oct 2007 07:19:56 +0000 Received: from 91.84.88.167 ([91.84.88.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Oct 2007 07:19:56 +0000 Received: from slong by 91.84.88.167 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Oct 2007 07:19:56 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Steve Long Subject: [gentoo-dev] Re: Re: Re: repoman - I cannot handle it... Date: Mon, 22 Oct 2007 08:24:04 +0100 Message-ID: References: <200710201445.56961.corsair@gentoo.org> <20071021133511.4bf29dfb@sheridan.genone.homeip.net> <20071022033648.a22f18bf.genone@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 91.84.88.167 User-Agent: KNode/0.10.4 Sender: news X-Archives-Salt: 9fdf0d31-312e-4aa6-b989-851f88c6de32 X-Archives-Hash: 7cf21dac36a8a91402b5b6cea7c24cc4 Marius Mauch wrote: > On Sun, 21 Oct 2007 23:13:58 +0100 > Steve Long 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