All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2 3/3] recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv
Date: Tue, 14 Jul 2015 19:43:57 -0500	[thread overview]
Message-ID: <1436921037-32378-4-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1436921037-32378-1-git-send-email-anibal.limon@linux.intel.com>

Some recipes uses v or r prefixes in versions that makes wrong
comparisions over recipes like lz4 r123 > 128.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 meta/lib/oe/recipeutils.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index f3da864..90dfba2 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -644,6 +644,12 @@ def get_recipe_pv_without_srcpv(pv, uri_type):
             pv = m.group('ver')
             pfx = m.group('pfx')
             sfx = m.group('sfx')
+    else:
+        regex = re.compile("(?P<pfx>(v|r|))(?P<ver>((\d+[\.\-_]*)+))")
+        m = regex.match(pv)
+        if m:
+            pv = m.group('ver')
+            pfx = m.group('pfx')
 
     return (pv, pfx, sfx)
 
-- 
1.9.1



  parent reply	other threads:[~2015-07-15  0:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15  0:43 [PATCHv2 0/3] oe/recipeutils.py: get_recipe_upstream_info improvements Aníbal Limón
2015-07-15  0:43 ` [PATCHv2 1/3] oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits Aníbal Limón
2015-07-15  0:43 ` [PATCHv2 2/3] oe/recipeutils.py: get_recipe_upstream_info update to get revision Aníbal Limón
2015-07-15  0:43 ` Aníbal Limón [this message]
2015-07-20 19:19 ` [PATCHv2 0/3] oe/recipeutils.py: get_recipe_upstream_info improvements Aníbal Limón

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=1436921037-32378-4-git-send-email-anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.