Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH] bb/fetch2/wget.py: latest_versionstring escape packagename when built regex
Date: Mon, 19 Jan 2015 17:34:25 -0600	[thread overview]
Message-ID: <1421710465-16610-1-git-send-email-anibal.limon@linux.intel.com> (raw)

When built package regex for use in searching upstream version in sites,
the package name need to be escaped to avoid usage of special regex
char.

For example when search for gtk+, '+' need to be escaped.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index b081b76..9e4b443 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -328,7 +328,7 @@ class Wget(FetchMethod):
         if version:
             package_custom_regex_comp = re.compile(
                 "(?P<name>%s)(?P<ver>%s)(?P<arch>%s)?[\.\-](?P<type>%s)$" %
-                (version[0], pver_regex, parch_regex, psuffix_regex))
+                (re.escape(version[0]), pver_regex, parch_regex, psuffix_regex))
 
         return package_custom_regex_comp
 
-- 
1.9.1



                 reply	other threads:[~2015-01-19 23:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1421710465-16610-1-git-send-email-anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=bitbake-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox