1 |
On Tue, 2008-11-25 at 14:03 -0800, Brian Harring wrote: |
2 |
> On Tue, Nov 25, 2008 at 06:05:21PM +0200, Amit Dor-Shifer wrote: |
3 |
> > Given the following: |
4 |
> > # qlist -Iv sys-apps/portage |
5 |
> > sys-apps/portage-2.1.4.5 |
6 |
> > |
7 |
> > How do I safely extract the "2.1.4.5"? |
8 |
> > |
9 |
> > (I don't necessarily need to use qlist. Just want to get the version of an |
10 |
> > installed package within a bash script) |
11 |
> |
12 |
> This *really* should be folded into portageq offhand- it's the initial |
13 |
> step towards shifting versionator logic (yet another standalone |
14 |
> parser/comparison implementation) into the PM. |
15 |
> |
16 |
> Counter arguements? |
17 |
> ~brian |
18 |
|
19 |
Yes. he said a bash script. portageq still takes a few seconds to load |
20 |
and invokes far far to many instructions for very simple info. |
21 |
|
22 |
The 3 execve's I just posted are still faster than one portageq call. |
23 |
So.. foo.c wins again. :p |
24 |
|
25 |
|
26 |
|
27 |
|
28 |
-- |
29 |
Ned Ludd <solar@g.o> |
30 |
Gentoo Linux |