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 1IjZJp-000246-AW for garchives@archives.gentoo.org; Sun, 21 Oct 2007 11:50:09 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l9LBcce8006199; Sun, 21 Oct 2007 11:38:38 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 l9LBadc7003806 for ; Sun, 21 Oct 2007 11:36:40 GMT Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 7D7E464F0F for ; Sun, 21 Oct 2007 11:36:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at gentoo.org X-Spam-Score: -1.35 X-Spam-Level: X-Spam-Status: No, score=-1.35 required=5.5 tests=[AWL=1.249, BAYES_00=-2.599] 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 kVDCBeztHoo1 for ; Sun, 21 Oct 2007 11:36:33 +0000 (UTC) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by smtp.gentoo.org (Postfix) with ESMTP id AF46164EF3 for ; Sun, 21 Oct 2007 11:36:32 +0000 (UTC) Received: from sheridan.genone.homeip.net (dslc-082-082-182-230.pools.arcor-ip.net [82.82.182.230]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1IjZ6d0zrd-0002Ta; Sun, 21 Oct 2007 13:36:31 +0200 Date: Sun, 21 Oct 2007 13:35:11 +0200 From: Marius Mauch To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: repoman - I cannot handle it... Message-ID: <20071021133511.4bf29dfb@sheridan.genone.homeip.net> In-Reply-To: References: <200710201445.56961.corsair@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.0; x86_64-pc-linux-gnu) 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: multipart/signed; boundary="Sig_/kyM+2d2=baye+koqy7Qgo3g"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Provags-ID: V01U2FsdGVkX19XmhXU3/mFrr9GCR78e6Gz67SacXPoPBGDRgU hH7RpnhSTd70oKAkIIdYl6yUYxf0+Te5bMy5hRPAfNHlN5u19j +TWFNSDbODCP0mpo2W4yQ== X-Archives-Salt: a1ac4a98-a7a4-44a9-9b96-7ad824e33cd9 X-Archives-Hash: 2afc0c86197ff1f9928e3d27b463958a --Sig_/kyM+2d2=baye+koqy7Qgo3g Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 21 Oct 2007 11:44:46 +0100 Steve Long wrote: > Markus Rothe wrote: >=20 > > Attached are the scripts I use to commit packages stable/unstable. > > Somewhere must be a bug! > >=20 > > 'name_split.cpp' splits a package name like sys-devel/gcc-4.1.2 into > > category, package name and version number. It's done in c++ as > > that's the only language I do more with than 'hello world' > > programms. Not much more, just more. ;-) > > > You can do this quite easily with a shell function. Here's a slightly > modded version of the one we use in update: > # returns true if there was a version > getPkgNameVer() { > case "$1" in > *-cvs[0-9]*) > pName=3D${1%-cvs[0-9]*} > pVer=3D${1#$pName-} > ;; *-[0-9]*) > pName=3D${1%%-[0-9]*} # from first -N > pVer=3D${1#$pName-} > ;; *) > pName=3D$1 > pVer=3D > ;; esac > pCat=3D${pName%/*}; pN=3D${pName#*/} > [ "$pVer" ] && return 0 > return 1 > } > ..which leaves the results in globals pName (which includes cat) > pVer, pCat and pN (no category.) It handles cvs ebuilds as well, and > is in sh. 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. 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. Marius --=20 Public Key at http://www.genone.de/info/gpg-key.pub In the beginning, there was nothing. And God said, 'Let there be Light.' And there was still nothing, but you could see a bit better. --Sig_/kyM+2d2=baye+koqy7Qgo3g Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFHGzl1WzrL1pM7SNcRAuKCAJ4lc1H0zRUQoNTAE8YgWWBGTC8D/wCdHnqs nRkLjY4d+e5dVsQlwAHb5gI= =z3Hx -----END PGP SIGNATURE----- --Sig_/kyM+2d2=baye+koqy7Qgo3g-- -- gentoo-dev@gentoo.org mailing list