Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] How to extract the version/revision of an installed package?
Date: Tue, 25 Nov 2008 22:03:51
Message-Id: 20081125220345.GA5426@hrair.corp.631h.metaweb.com
In Reply to: [gentoo-portage-dev] How to extract the version/revision of an installed package? by Amit Dor-Shifer
1 On Tue, Nov 25, 2008 at 06:05:21PM +0200, Amit Dor-Shifer wrote:
2 > Given the following:
3 > # qlist -Iv sys-apps/portage
4 > sys-apps/portage-2.1.4.5
5 >
6 > How do I safely extract the "2.1.4.5"?
7 >
8 > (I don't necessarily need to use qlist. Just want to get the version of an
9 > installed package within a bash script)
10
11 This *really* should be folded into portageq offhand- it's the initial
12 step towards shifting versionator logic (yet another standalone
13 parser/comparison implementation) into the PM.
14
15 Counter arguements?
16 ~brian

Replies