diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2015-07-14 19:30:58 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-22 08:23:50 +0100 |
commit | 22d2f7b1caf3d1a05b814df5e01e630ccb839e46 (patch) | |
tree | e184bb1344d1d368374a006dd1dd46d491c859e0 /bitbake/lib/bb/fetch2 | |
parent | bd5167d154ac04dbecbda3a157ae8ef6304e0b4e (diff) | |
download | poky-22d2f7b1caf3d1a05b814df5e01e630ccb839e46.tar.gz |
bitbake: fetch2/wget.py: latest_versionstring now returns (version, revision)
Now latest_versionstring method returns (version, revision) for comply
the new return convention needed by SCM's like git get the current
revision.
bb/tests/fetch.py: Updated wget latest_versionstring test for comply new
convention.
[YOCTO #7605]
(Bitbake rev: 8d454646cbe1b04758ca178d8c6fcfd02b818b7b)
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/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 545f02dcf0..425b6b9a2a 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
@@ -507,12 +507,12 @@ class Wget(FetchMethod): | |||
507 | if not re.search("\d+", package): | 507 | if not re.search("\d+", package): |
508 | current_version[1] = re.sub('_', '.', current_version[1]) | 508 | current_version[1] = re.sub('_', '.', current_version[1]) |
509 | current_version[1] = re.sub('-', '.', current_version[1]) | 509 | current_version[1] = re.sub('-', '.', current_version[1]) |
510 | return current_version[1] | 510 | return (current_version[1], '') |
511 | 511 | ||
512 | package_regex = self._init_regexes(package, ud, d) | 512 | package_regex = self._init_regexes(package, ud, d) |
513 | if package_regex is None: | 513 | if package_regex is None: |
514 | bb.warn("latest_versionstring: package %s don't match pattern" % (package)) | 514 | bb.warn("latest_versionstring: package %s don't match pattern" % (package)) |
515 | return "" | 515 | return ('', '') |
516 | bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern)) | 516 | bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern)) |
517 | 517 | ||
518 | uri = "" | 518 | uri = "" |
@@ -530,12 +530,12 @@ class Wget(FetchMethod): | |||
530 | 530 | ||
531 | dirver_pn_regex = re.compile("%s\d?" % (re.escape(pn))) | 531 | dirver_pn_regex = re.compile("%s\d?" % (re.escape(pn))) |
532 | if not dirver_pn_regex.search(dirver): | 532 | if not dirver_pn_regex.search(dirver): |
533 | return self._check_latest_version_by_dir(dirver, | 533 | return (self._check_latest_version_by_dir(dirver, |
534 | package, package_regex, current_version, ud, d) | 534 | package, package_regex, current_version, ud, d), '') |
535 | 535 | ||
536 | uri = bb.fetch.encodeurl([ud.type, ud.host, path, ud.user, ud.pswd, {}]) | 536 | uri = bb.fetch.encodeurl([ud.type, ud.host, path, ud.user, ud.pswd, {}]) |
537 | else: | 537 | else: |
538 | uri = regex_uri | 538 | uri = regex_uri |
539 | 539 | ||
540 | return self._check_latest_version(uri, package, package_regex, | 540 | return (self._check_latest_version(uri, package, package_regex, |
541 | current_version, ud, d) | 541 | current_version, ud, d), '') |