Gentoo Archives: gentoo-dev

From: Robert Moss <robmoss@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Idea for change of emerge -up output
Date: Fri, 03 Sep 2004 12:35:36
Message-Id: 4138651B.2080802@gentoo.org
In Reply to: [gentoo-dev] Idea for change of emerge -up output by tigger@gentoo.org
1 > The current output of emerge -p is difficult to machine parse because
2 > its difficult to split the package name and package version. However,
3
4 Really? All you have to do is strip off the stuff between the [ and ]
5 plus the space, strip off anything after the now remaining first space,
6 and then you have something like app-text/ghostscript-7.07.1-r5. Then
7 anything before hyphen-digit is the package name, and anything after the
8 hyphen in hyphen-digit is the package version. So, you just want to (for
9 example) regexp away "-[[:digit:]]*.*" for the package name, and match
10 that and strip the hyphen for the version. Why is this difficult all of
11 a sudden?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies