Gentoo Archives: gentoo-portage-dev

From: Ned Ludd <solar@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] How to extract the version/revision of an installed package?
Date: Wed, 26 Nov 2008 00:15:13
Message-Id: 1227658509.18783.81.camel@hangover
In Reply to: [gentoo-portage-dev] How to extract the version/revision of an installed package? by Amit Dor-Shifer
1 On Tue, 2008-11-25 at 18:05 +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
9 > an installed package within a bash script)
10 >
11
12
13 qatom $(qlist -ICv sys-apps/portage) | awk '{print $3}'
14
15
16
17 --
18 Ned Ludd <solar@g.o>
19 Gentoo Linux

Replies