public inbox for gentoo-devhelp@lists.gentoo.org
 help / color / mirror / Atom feed
From: Nikos Chantziaras <realnc@gmail.com>
To: gentoo-devhelp@lists.gentoo.org
Subject: [gentoo-devhelp] How do I get the major+minor version of a package?
Date: Thu, 30 May 2013 14:06:24 +0300	[thread overview]
Message-ID: <ko7bri$iop$1@ger.gmane.org> (raw)

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.



             reply	other threads:[~2013-05-30 11:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 11:06 Nikos Chantziaras [this message]
2013-05-30 11:11 ` [gentoo-devhelp] How do I get the major+minor version of a package? Justin
2013-06-07  5:03   ` [gentoo-devhelp] " Nikos Chantziaras

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='ko7bri$iop$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