From: Nikos Chantziaras <realnc@gmail.com>
To: gentoo-devhelp@lists.gentoo.org
Subject: [gentoo-devhelp] Re: How do I get the major+minor version of a package?
Date: Fri, 07 Jun 2013 08:03:14 +0300 [thread overview]
Message-ID: <korpip$1pn$1@ger.gmane.org> (raw)
In-Reply-To: <51A733C8.60009@gentoo.org>
On 30/05/13 14:11, Justin wrote:
> On 30/05/13 13:06, Nikos Chantziaras wrote:
>> Let's suppose that $PV is "2.5.1". How would I get the "2.5" in it in an
>> ebuild? I know about ${PV:0:3}, but this breaks if $PV is, say,
>> "2.13.1". In that case, I would get "2.1" instead of "2.13".
>>
>> I've looked in the various eclasses if there's some utility function
>> that get me the major and minor version, but can't find anything.
>>
>
> hi,
>
> take a look into the versionator.eclass [1]. You need to use
> get_version_component_range()
>
> justin
>
>
> 1 http://devmanual.gentoo.org/eclass-reference/versionator.eclass/index.html
Yep, does the just perfectly. Thanks!
prev parent reply other threads:[~2013-06-07 5:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 11:06 [gentoo-devhelp] How do I get the major+minor version of a package? Nikos Chantziaras
2013-05-30 11:11 ` Justin
2013-06-07 5:03 ` Nikos Chantziaras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='korpip$1pn$1@ger.gmane.org' \
--to=realnc@gmail.com \
--cc=gentoo-devhelp@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox