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 <gentoo-dev+bounces-27259-garchives=archives.gentoo.org@gentoo.org>) id 1IjjCq-000898-J5 for garchives@archives.gentoo.org; Sun, 21 Oct 2007 22:23:37 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9LMBvt9016341; Sun, 21 Oct 2007 22:11:57 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 l9LM9xfr013892 for <gentoo-dev@lists.gentoo.org>; Sun, 21 Oct 2007 22:10:00 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 0B9916531D for <gentoo-dev@lists.gentoo.org>; Sun, 21 Oct 2007 22:09:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: 0.019 X-Spam-Level: X-Spam-Status: No, score=0.019 required=5.5 tests=[AWL=0.551, 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 V6mvMV9Z8eQm for <gentoo-dev@lists.gentoo.org>; Sun, 21 Oct 2007 22:09:52 +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 4C26164FE1 for <gentoo-dev@gentoo.org>; Sun, 21 Oct 2007 22:09:51 +0000 (UTC) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IjizS-0008VU-J4 for gentoo-dev@gentoo.org; Sun, 21 Oct 2007 22:09:46 +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 <gentoo-dev@gentoo.org>; Sun, 21 Oct 2007 22:09:46 +0000 Received: from slong by 91.84.88.167 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <gentoo-dev@gentoo.org>; Sun, 21 Oct 2007 22:09:46 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-dev@lists.gentoo.org From: Steve Long <slong@rathaus.eclipse.co.uk> Subject: [gentoo-dev] Re: Re: repoman - I cannot handle it... Date: Sun, 21 Oct 2007 23:13:58 +0100 Message-ID: <ffgin4$43t$1@ger.gmane.org> References: <200710201445.56961.corsair@gentoo.org> <fffaat$g5b$1@ger.gmane.org> <20071021133511.4bf29dfb@sheridan.genone.homeip.net> Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> 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 <news@ger.gmane.org> X-Archives-Salt: 9e2177d4-66c2-44a7-9fce-5b1bc9cec8d0 X-Archives-Hash: 96fcbc42eafc47ec33416a7b830f2772 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. 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]+))?$' For inter-rev compatibility, we changed the last term to: (-r([0-9.]+))? (we check that there's only one . later.) [We should also use [[:digit:]] instead of [0-9] for i18n.] I think we can use: CPV='^(.*-.*)/(.*)-(cvs\.)?([0-9]+)((\.[0-9]+)*)([a-z]?)((_(pre|p|beta alpha|rc)[0-9]*)*)(-r([0-9.]+))?$' - as a regex to check against. If it doesn't match, it isn't a valid cpv (I think.) I've tested it on the whole (non-overlay) tree with the following script: http://dev.gentooexperimental.org/~igli/src/verCheck md5: 53ef36ffd9388308ff02306f301382c1 It's called with ./verCheck to check the whole tree, or with an optional [cat-search] parameter, eg ./verCheck media-fonts or ./verCheck 'media-*' Adding -v as the first parameter means it will output version info for all ebuilds it finds, otherwise it will only output for packages with the tricky pattern -[0-9] Any ebuilds that don't match, get output to stderr. I didn't find any, and for all the ones it found with -N in the package name, it seemed to get the correct version numbers, afaict: $ ./verCheck app-dicts: canna-2ch 20030827 media-fonts: font-adobe-100dpi 1.0.0 font-adobe-75dpi 1.0.0 font-adobe-utopia-100dpi 1.0.1 font-adobe-utopia-75dpi 1.0.1 font-bh-100dpi 1.0.0 font-bh-75dpi 1.0.0 font-bh-lucidatypewriter-100dpi 1.0.0 font-bh-lucidatypewriter-75dpi 1.0.0 font-bitstream-100dpi 1.0.0 font-bitstream-75dpi 1.0.0 net-dialup: intel-536ep 4.71 net-misc: cisco-vpnclient-3des 4.6.02.0030 4.6.03.01901 4.7.00.0640 4.7.00.06401 4.8.00.0490 nxclient-2xterminalserver 1.5.0 nxserver-2xterminalserver 1.5.0 (No, UberLord: it /won't/ work in sh ;p) -- gentoo-dev@gentoo.org mailing list