From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9552 invoked from network); 3 Sep 2004 12:35:36 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 3 Sep 2004 12:35:36 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.34) id 1C3DI0-0003t3-IR for arch-gentoo-dev@lists.gentoo.org; Fri, 03 Sep 2004 12:35:36 +0000 Received: (qmail 15215 invoked by uid 89); 3 Sep 2004 12:35:35 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 26623 invoked from network); 3 Sep 2004 12:35:35 +0000 Message-ID: <4138651B.2080802@gentoo.org> Date: Fri, 03 Sep 2004 13:35:39 +0100 From: Robert Moss User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040821) X-Accept-Language: en-us, en MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org References: <20040903125147.GB6307@gentoo.org> In-Reply-To: <20040903125147.GB6307@gentoo.org> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4D4CD593E392CA26C31D8AAE" Subject: Re: [gentoo-dev] Idea for change of emerge -up output X-Archives-Salt: 6447f3a7-ac2c-415a-a9cf-1470b8342d16 X-Archives-Hash: 1536469e1e929dbd0583139e9520cf84 --------------enig4D4CD593E392CA26C31D8AAE Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit > The current output of emerge -p is difficult to machine parse because > its difficult to split the package name and package version. However, Really? All you have to do is strip off the stuff between the [ and ] plus the space, strip off anything after the now remaining first space, and then you have something like app-text/ghostscript-7.07.1-r5. Then anything before hyphen-digit is the package name, and anything after the hyphen in hyphen-digit is the package version. So, you just want to (for example) regexp away "-[[:digit:]]*.*" for the package name, and match that and strip the hyphen for the version. Why is this difficult all of a sudden? --------------enig4D4CD593E392CA26C31D8AAE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iEYEARECAAYFAkE4ZR0ACgkQq/c/2ZoPH0Q4FwCcCJb4e4Web93R5b04+p4+j7xU GWAAn3V177Q+WZRYTKx3H8UWxNNveoAI =km4S -----END PGP SIGNATURE----- --------------enig4D4CD593E392CA26C31D8AAE--