summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2015-02-13 15:58:13 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-16 09:13:06 +0000
commit1c1d9e3bebf5afeff2b6d8076557d509707e695f (patch)
tree504abe9dbf7a3f71ce16c42430549a879b5e7f37 /bitbake/lib/bb
parent5a88664b220bbfa3c82784c4dc288fd130ed3d85 (diff)
downloadpoky-1c1d9e3bebf5afeff2b6d8076557d509707e695f.tar.gz
bitbake: fetch2: wget remove scape of - in regexes don't needed
(Bitbake rev: 8fa43245351f3ec0a5007b2742c08b7ef98e7879) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 570bd47ac0..162a6bd3be 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -141,7 +141,7 @@ class Wget(FetchMethod):
141 else: 141 else:
142 version = version[1:len(version)] 142 version = version[1:len(version)]
143 143
144 version = re.sub('\-', '.', version) 144 version = re.sub('-', '.', version)
145 version = re.sub('_', '.', version) 145 version = re.sub('_', '.', version)
146 version = re.sub('(rc)+', '.1000.', version) 146 version = re.sub('(rc)+', '.1000.', version)
147 version = re.sub('(beta)+', '.100.', version) 147 version = re.sub('(beta)+', '.100.', version)
@@ -246,7 +246,7 @@ class Wget(FetchMethod):
246 version_dir = ['', '', ''] 246 version_dir = ['', '', '']
247 version = ['', '', ''] 247 version = ['', '', '']
248 248
249 dirver_regex = re.compile("(\D*)((\d+[\.\-_])+(\d+))") 249 dirver_regex = re.compile("(\D*)((\d+[\.-_])+(\d+))")
250 s = dirver_regex.search(dirver) 250 s = dirver_regex.search(dirver)
251 if s: 251 if s:
252 version_dir[1] = s.group(2) 252 version_dir[1] = s.group(2)
@@ -296,26 +296,26 @@ class Wget(FetchMethod):
296 gst-fluendo-mp3 296 gst-fluendo-mp3
297 """ 297 """
298 # match most patterns which uses "-" as separator to version digits 298 # match most patterns which uses "-" as separator to version digits
299 pn_prefix1 = "[a-zA-Z][a-zA-Z0-9]*([\-_][a-zA-Z]\w+)*\+?[\-_]" 299 pn_prefix1 = "[a-zA-Z][a-zA-Z0-9]*([-_][a-zA-Z]\w+)*\+?[-_]"
300 # a loose pattern such as for unzip552.tar.gz 300 # a loose pattern such as for unzip552.tar.gz
301 pn_prefix2 = "[a-zA-Z]+" 301 pn_prefix2 = "[a-zA-Z]+"
302 # a loose pattern such as for 80325-quicky-0.4.tar.gz 302 # a loose pattern such as for 80325-quicky-0.4.tar.gz
303 pn_prefix3 = "[0-9]+[\-]?[a-zA-Z]+" 303 pn_prefix3 = "[0-9]+[-]?[a-zA-Z]+"
304 # Save the Package Name (pn) Regex for use later 304 # Save the Package Name (pn) Regex for use later
305 pn_regex = "(%s|%s|%s)" % (pn_prefix1, pn_prefix2, pn_prefix3) 305 pn_regex = "(%s|%s|%s)" % (pn_prefix1, pn_prefix2, pn_prefix3)
306 306
307 # match version 307 # match version
308 pver_regex = "(([A-Z]*\d+[a-zA-Z]*[\.\-_]*)+)" 308 pver_regex = "(([A-Z]*\d+[a-zA-Z]*[\.-_]*)+)"
309 309
310 # match arch 310 # match arch
311 parch_regex = "\-source|_all_" 311 parch_regex = "-source|_all_"
312 312
313 # src.rpm extension was added only for rpm package. Can be removed if the rpm 313 # src.rpm extension was added only for rpm package. Can be removed if the rpm
314 # packaged will always be considered as having to be manually upgraded 314 # packaged will always be considered as having to be manually upgraded
315 psuffix_regex = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm|bz2|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)" 315 psuffix_regex = "(tar\.gz|tgz|tar\.bz2|zip|xz|rpm|bz2|orig\.tar\.gz|tar\.xz|src\.tar\.gz|src\.tgz|svnr\d+\.tar\.bz2|stable\.tar\.gz|src\.rpm)"
316 316
317 # match name, version and archive type of a package 317 # match name, version and archive type of a package
318 package_regex_comp = re.compile("(?P<name>%s?\.?v?)(?P<pver>%s)(?P<arch>%s)?[\.\-](?P<type>%s$)" 318 package_regex_comp = re.compile("(?P<name>%s?\.?v?)(?P<pver>%s)(?P<arch>%s)?[\.-](?P<type>%s$)"
319 % (pn_regex, pver_regex, parch_regex, psuffix_regex)) 319 % (pn_regex, pver_regex, parch_regex, psuffix_regex))
320 self.suffix_regex_comp = re.compile(psuffix_regex) 320 self.suffix_regex_comp = re.compile(psuffix_regex)
321 321
@@ -327,7 +327,7 @@ class Wget(FetchMethod):
327 version = self._parse_path(package_regex_comp, package) 327 version = self._parse_path(package_regex_comp, package)
328 if version: 328 if version:
329 package_custom_regex_comp = re.compile( 329 package_custom_regex_comp = re.compile(
330 "(?P<name>%s)(?P<pver>%s)(?P<arch>%s)?[\.\-](?P<type>%s)" % 330 "(?P<name>%s)(?P<pver>%s)(?P<arch>%s)?[\.-](?P<type>%s)" %
331 (re.escape(version[0]), pver_regex, parch_regex, psuffix_regex)) 331 (re.escape(version[0]), pver_regex, parch_regex, psuffix_regex))
332 else: 332 else:
333 package_custom_regex_comp = None 333 package_custom_regex_comp = None
@@ -362,7 +362,7 @@ class Wget(FetchMethod):
362 362
363 # search for version matches on folders inside the path, like: 363 # search for version matches on folders inside the path, like:
364 # "5.7" in http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz 364 # "5.7" in http://download.gnome.org/sources/${PN}/5.7/${PN}-${PV}.tar.gz
365 dirver_regex = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([\-_]r\d+)*)/") 365 dirver_regex = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([-_]r\d+)*)/")
366 m = dirver_regex.search(path) 366 m = dirver_regex.search(path)
367 if m: 367 if m:
368 pn = d.getVar('PN', True) 368 pn = d.getVar('PN', True)