1 |
On 30/05/13 13:06, Nikos Chantziaras wrote: |
2 |
> Let's suppose that $PV is "2.5.1". How would I get the "2.5" in it in an |
3 |
> ebuild? I know about ${PV:0:3}, but this breaks if $PV is, say, |
4 |
> "2.13.1". In that case, I would get "2.1" instead of "2.13". |
5 |
> |
6 |
> I've looked in the various eclasses if there's some utility function |
7 |
> that get me the major and minor version, but can't find anything. |
8 |
> |
9 |
> |
10 |
|
11 |
hi, |
12 |
|
13 |
take a look into the versionator.eclass [1]. You need to use |
14 |
get_version_component_range() |
15 |
|
16 |
justin |
17 |
|
18 |
|
19 |
1 http://devmanual.gentoo.org/eclass-reference/versionator.eclass/index.html |