summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:09 +0000
commit1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch)
treedc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/fetch2/wget.py
parent1d0c124cdf0282b8d139063409e40982f0ec9888 (diff)
downloadpoky-1fce7ecbbb004a5ad82da3eef79cfd52b276708d.tar.gz
bitbake: bitbake: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index ecb946aa81..4ba63df0a8 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -88,7 +88,7 @@ class Wget(FetchMethod):
88 if not ud.localfile: 88 if not ud.localfile:
89 ud.localfile = data.expand(urllib.parse.unquote(ud.host + ud.path).replace("/", "."), d) 89 ud.localfile = data.expand(urllib.parse.unquote(ud.host + ud.path).replace("/", "."), d)
90 90
91 self.basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate" 91 self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate"
92 92
93 def _runwget(self, ud, d, command, quiet): 93 def _runwget(self, ud, d, command, quiet):
94 94
@@ -104,7 +104,7 @@ class Wget(FetchMethod):
104 fetchcmd = self.basecmd 104 fetchcmd = self.basecmd
105 105
106 if 'downloadfilename' in ud.parm: 106 if 'downloadfilename' in ud.parm:
107 dldir = d.getVar("DL_DIR", True) 107 dldir = d.getVar("DL_DIR")
108 bb.utils.mkdirhier(os.path.dirname(dldir + os.sep + ud.localfile)) 108 bb.utils.mkdirhier(os.path.dirname(dldir + os.sep + ud.localfile))
109 fetchcmd += " -O " + dldir + os.sep + ud.localfile 109 fetchcmd += " -O " + dldir + os.sep + ud.localfile
110 110
@@ -543,7 +543,7 @@ class Wget(FetchMethod):
543 self.suffix_regex_comp = re.compile(psuffix_regex) 543 self.suffix_regex_comp = re.compile(psuffix_regex)
544 544
545 # compile regex, can be specific by package or generic regex 545 # compile regex, can be specific by package or generic regex
546 pn_regex = d.getVar('UPSTREAM_CHECK_REGEX', True) 546 pn_regex = d.getVar('UPSTREAM_CHECK_REGEX')
547 if pn_regex: 547 if pn_regex:
548 package_custom_regex_comp = re.compile(pn_regex) 548 package_custom_regex_comp = re.compile(pn_regex)
549 else: 549 else:
@@ -564,7 +564,7 @@ class Wget(FetchMethod):
564 sanity check to ensure same name and type. 564 sanity check to ensure same name and type.
565 """ 565 """
566 package = ud.path.split("/")[-1] 566 package = ud.path.split("/")[-1]
567 current_version = ['', d.getVar('PV', True), ''] 567 current_version = ['', d.getVar('PV'), '']
568 568
569 """possible to have no version in pkg name, such as spectrum-fw""" 569 """possible to have no version in pkg name, such as spectrum-fw"""
570 if not re.search("\d+", package): 570 if not re.search("\d+", package):
@@ -579,7 +579,7 @@ class Wget(FetchMethod):
579 bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern)) 579 bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern))
580 580
581 uri = "" 581 uri = ""
582 regex_uri = d.getVar("UPSTREAM_CHECK_URI", True) 582 regex_uri = d.getVar("UPSTREAM_CHECK_URI")
583 if not regex_uri: 583 if not regex_uri:
584 path = ud.path.split(package)[0] 584 path = ud.path.split(package)[0]
585 585
@@ -588,7 +588,7 @@ class Wget(FetchMethod):
588 dirver_regex = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([-_]r\d+)*)/") 588 dirver_regex = re.compile("(?P<dirver>[^/]*(\d+\.)*\d+([-_]r\d+)*)/")
589 m = dirver_regex.search(path) 589 m = dirver_regex.search(path)
590 if m: 590 if m:
591 pn = d.getVar('PN', True) 591 pn = d.getVar('PN')
592 dirver = m.group('dirver') 592 dirver = m.group('dirver')
593 593
594 dirver_pn_regex = re.compile("%s\d?" % (re.escape(pn))) 594 dirver_pn_regex = re.compile("%s\d?" % (re.escape(pn)))