summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch/wget: use with to ensure the response is closedRoss Burton2017-11-211-1/+2
| | | | | | | (Bitbake rev: 8c487176d311557031cedba76185f14f0e7a14cd) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: improve proxy objectRoss Burton2017-11-211-0/+1
| | | | | | | | | | The connection cache class uses a dummy file object but it doesn't have a closed attribute, so we can't use it in a context manager. (Bitbake rev: 7b072ef91d16331eae11bd60f229ce1f0c175995) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget: fix FusionForge workaroundRoss Burton2017-07-311-6/+3
| | | | | | | | | | | | | | | | | My previous assertion about FusionForge appears to have been wrong, or FusionForge has changed behaviour, or both. FusionForge now mandates that downloads have the Accept header set, despite that header being optional, and returns a 406 Not Acceptable error if it isn't set. As we were pretending that 406 was actually 405 (Moved) and tried to handle it as a redirect this results in an infinite loop until Python kills the recursion. Delete the handling of 406 as 405, and pass Accept: */* in the headers. (Bitbake rev: bb70ae0c9aac5ec688026d23a64ac0cac1947187) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: mitigate a wget race condition when listing FTP directoriesRoss Burton2017-07-251-12/+11
| | | | | | | | | | | | | | | | | | | | | | When wget is fetching a listing for a directory over FTP it writes to a temporary file called .listing in the current directory. If there are many such operations happening in parallel - for example during 'bitbake world -c checkpkg' - then up to BB_NUMBER_THREADS instances of wget will be racing to write to, read, and delete the same file. This results in various failures such as the file disappearing before wget has processed it or the file changing contents, which causes checkpkg to randomly fail. Mitigate the race condition by creating a temporary directory to run wget in when doing directory listings. [ YOCTO #11828 ] (Bitbake rev: 91d4ca93df092cf86ab84faaa94cc66ff9f43057) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: improve error handling during sstate checkPatrick Ohly2017-07-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the sstate is accessed via HTTP, the existence check can fail due to network issues, in which case bitbake silently continues without sstate. One such network issue is an HTTP server like Python's own SimpleHTTP which closes the TCP connection despite an explicit "Keep-Alive" in the HTTP request header. The server does that without a "close" in the HTTP response header, so the socket remains in the connection cache, leading to "urlopen failed: <urlopen error [Errno 9] Bad file descriptor>" (only visible in "bitbake -D -D" output) when trying to use the cached connection again. The connection might also get closed for other reasons (proxy, timeouts, etc.), so this is something that the client should be able to handle. This is achieved by checking for the error, removing the bad connection, and letting the check_status() method try again with a new connection. It is necessary to let the second attempt fail permanently, because bad proxy setups have been observed to also lead to such broken connections. In that case, we need to abort for real after trying twice, otherwise a build would just hang forever. [YOCTO #11782] (Bitbake rev: 6fa07752bbd3ac345cd8617da49a70e0b2dd565f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget: Fix handling of urls with user/passwordRichard Purdie2017-03-311-3/+2
| | | | | | | | | | | | | URL decoding was improved in the core a while ago and this looks like a leftover from those times which caused urls needing a user/password to fail. Use the parameters from the core instead of the broken split implementation. [YOCTO #11262] (Bitbake rev: 6a917ec99d659e684b15fa8af94c325172676062) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: don't use deprecated bb.data APIsAndre McCurdy2017-03-011-3/+2
| | | | | | | | | Cleanup some more usage of bb.data APIs in the fetchers. (Bitbake rev: 9752fd1c10b8fcc819822fa6eabc2c1050fcc03b) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget.py: match .lz tarballs as well when determining latest versionAlexander Kanavin2017-03-011-1/+1
| | | | | | | (Bitbake rev: c55e09fbd2b64a2b909d9992350b6b2e26e5e86d) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: fixup case with no useful netrc dataMark Asselstine2016-12-211-1/+1
| | | | | | | | | | | | | | | | Commit 873e33d0479e977520106b65d149ff1799195bf6 [fetch2/wget: add Basic Auth from netrc to checkstatus()] causes "Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work." on new builds when a user has a .netrc file but there is no default and no matching host. The call to netrc.authenticators() will return None in these cases and the attempted assignment to the 3-tuple will raise a TypeError exception. Add the TypeError to the exceptions caught to get around this issue. (Bitbake rev: c0c0af40ebddaf9dc99353c580a65d4c04295613) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: add Basic Auth from netrc to checkstatus()Matthew McClintock2016-12-201-2/+14
| | | | | | | | | | | | | | fetch2/wget uses urllib to check the status of the mirrors, wget will use netrc to pass login and password information however checkstatus will skip that. This adds netrc login and password to checkstatus so both will work the same. (Bitbake rev: 873e33d0479e977520106b65d149ff1799195bf6) Signed-off-by: Matthew McClintock <msm-oss@mcclintock.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: obey BB_ALLOWED_NETWORKS when checking network accessMarkus Lehtonen2016-11-301-1/+1
| | | | | | | | | [YOCTO #10508] (Bitbake rev: ddd3bc2d64d7240ecb6b6e4a1ae29b1faef6cc22) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: remove True option to getVar callsJoshua Lock2016-11-301-6/+6
| | | | | | | | | | | | 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>
* bitbake: wget: allow basic http auth for SSTATE_MIRRORSStephano Cetola2016-09-021-0/+11
| | | | | | | | | | | | | | | | | | If http basic auth creds were added to sstate mirrors like so: https://foo.com/sstate/PATH;user=foo:bar;downloadfilename=PATH The sstate mirror check would silently fail with 401 unauthorized. This patch allows both the check, and the wget download to succeed by checking for user credentials and if present adding the correct headers, or wget params as needed. [ YOCTO #9815 ] (Bitbake rev: cea8113d14da9e12db80a5b6b5811a47a7dfdeef) Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: implement progress supportPaul Eggleton2016-07-191-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement progress reporting support specifically for the fetchers. For fetch tasks we don't necessarily know which fetcher will be used (we might initially be fetching a git:// URI, but if we instead download a mirror tarball we may fetch that over http using wget). These programs also have different abilities as far as reporting progress goes (e.g. wget gives us percentage complete and rate, git gives this some of the time depending on what stage it's at). Additionally we filter out the progress output before it makes it to the logs, in order to prevent the logs filling up with junk. At the moment this is only implemented for the wget and git fetchers since they are the most commonly used (and svn doesn't seem to support any kind of progress output, at least not without doing a relatively expensive remote file listing first). Line changes such as the ones you get in git's output as it progresses don't make it to the log files, you only get the final state of the line so the logs aren't filled with progress information that's useless after the fact. Part of the implementation for [YOCTO #5383]. (Bitbake rev: 4027649f422ee64b1c4e1ad8d48ac295050afbff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: attempt checkstatus again if it failsRoss Burton2016-07-081-4/+8
| | | | | | | | | | | | | Some services such as SourceForge seem to struggle to keep up under load, with the result that over half of the autobuilder checkuri runs fail with sourceforge.net "connection timed out". Attempt to mitigate this by re-attempting once the network operation on failure. (Bitbake rev: 54b1961551511948e0cbd2ac39f19b39b9cee568) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Convert to python 3Richard Purdie2016-06-021-24/+24
| | | | | | | | | Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: _check_latest_version_by_dir fix prefix detectionAníbal Limón2016-03-281-2/+12
| | | | | | | | | | | | | | | | When prefix is part of the version directory it need to ensure that only version directory is used so remove previous directories if exists. Example: pfx = '/dir1/dir2/v' and version = '2.5' the expected result is 'v2.5' instead of '/dir1/dir2/v2.5'. [YOCTO #8778] (Bitbake rev: c760531c6dbf88135ab9f8e6f0784ccbf2cce1e4) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: _check_latest_version_by_dir use group namesAníbal Limón2016-03-281-4/+4
| | | | | | | | | | Little improvement for reference tokens by names instead of index. (Bitbake rev: e8ea15eeb1857ed4bb6337836bd2fb1f5dbb1bdf) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: Set localfile for directoriesRichard Purdie2016-02-281-0/+2
| | | | | | | | | | | | If we wget something which looks directory like we end up with lock files and done stamps without names, they also all use the same lockfile. This change ensures that we use separate lock files based on the url and avoid creating the mysterious ${DL_DIR}/.done files. (Bitbake rev: 20bc82086018832e047345a672d74b6c1c113650) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/fetch2: Move export_proxies function from wget to utils.Aníbal Limón2016-02-081-16/+1
| | | | | | | | | | | In order to use in other modules since is a common function when needs to get proxies working. (Bitbake rev: 85c529044381895556d603a3974de22392646a22) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: fallback to GET if HEAD is rejected in checkstatus()Ross Burton2016-01-261-23/+49
| | | | | | | | | | | | | | | The core change here is to fall back to GET requests if HEAD is rejected in the checkstatus() method, as you can't do a HEAD on Amazon S3 (used by Github archives). This meant removing the monkey patch that the default method was GET and adding a fixed redirect handler that doesn't reset to GET. Also, change the way the opener is constructed from an if/elif cluster to a conditionally constructed list. (Bitbake rev: 6ec70d5d2e330b41b932b0a655b838a5f37df01e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: rename REGEX, REGEX_URI, and GITTAGREGEX.Alexander Kanavin2015-12-081-2/+2
| | | | | | | | | | | | Rename REGEX to UPSTREAM_CHECK_REGEX, REGEX_URI to UPSTREAM_CHECK_URI, and GITTAGREGEX to UPSTREAM_CHECK_GITTAGREGEX to better reflect their purpose and to reflect a common namespace. (Bitbake rev: f0a9e783f9969573fd74edfa241ef14f18ac684e) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget.py: parse only <a> tagsAlexander Kanavin2015-12-071-2/+3
| | | | | | | | | | | | | | | For two reasons: 1) The important one: we hit the following bug when doing upstream version checks on some webpages: https://bugs.launchpad.net/beautifulsoup/+bug/1471755 2) Also, documentation for beautifulsoup states that memory usage and speed is improved that way. (Bitbake rev: 7546d4aeb3ba8fda9832081b84d93138dc5e58d6) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget.py: fix incorrect regexesAlexander Kanavin2015-08-011-2/+2
| | | | | | | | | | | [\.-_] means "any character between . and _" What was meant here is certainly "any character from the three characters .-_" (Bitbake rev: af13eaba627f199f91c048c435b9dbe19c79527f) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: latest_versionstring now returns (version, revision)Aníbal Limón2015-07-221-6/+6
| | | | | | | | | | | | | | | | 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>
* bitbake: fetch2/wget.py: checkstatus disable SSL cert validation.Aníbal Limón2015-07-121-2/+18
| | | | | | | | | | | Since Python 2.7.9 ssl cert validation is enabled by default see PEP-0476, this causes verification errors on some https servers so disable by default. (Bitbake rev: e177170200ece76b36e3f7d5597651fdef67736f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: checkstatus fix using proxy handlerAníbal Limón2015-07-121-4/+16
| | | | | | | | | Only use ProxyHandler opener when exists proxies in env. (Bitbake rev: 0f062c5d99e12ce20c0e46a8e602448032144ff6) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget.py: Add support of connection cache in checkstatus.Aníbal Limón2015-07-121-4/+136
| | | | | | | | | | | | | fetch2/__init__.py: Add connection_cache param in Fetch __init__. In order to pass connection cache object to checkstatus method. [YOCTO #7796] (Bitbake rev: 9fa6407e6cefe66c77467419a8040d6957a6bb01) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add fetch parameter to checkstatusyocto-1.9_M1Aníbal Limón2015-07-091-1/+1
| | | | | | | | | | In order to pass connection cache object to checkstatus function add fetch parameter. (Bitbake rev: fbb9c6f5538084e125b58118a86968908e6f895b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget remove scape of - in regexes don't neededAníbal Limón2015-02-161-9/+9
| | | | | | | (Bitbake rev: 8fa43245351f3ec0a5007b2742c08b7ef98e7879) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget _modelate_version improvmentsAníbal Limón2015-02-161-3/+3
| | | | | | | | | Fix sustition for rc, beta and alpha releses from -N to N weight. (Bitbake rev: 63a9e60a6d80cfd2693ec1a6359785dc19f98e1f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring improvments in get version by dirAníbal Limón2015-02-161-71/+37
| | | | | | | | | | | | | | Add support for scan every version directory using _check_latest_version makes code more robust because sometimes upstream projects publish new directories without files, causing don't find version. To support this new behaviour remove _check_latest_dir and replace for _check_latest_version_by_dir, (Bitbake rev: 1a75b3707743c32eec9d2cf566fb6bbea9f73784) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget add _check_latest_version_by_dirAníbal Limón2015-02-161-6/+46
| | | | | | | | | | | | | | | | | | | | | Add _check_latest_version_by_dir this function provides support for scan every directory newer than current dir in order to get latest_versionstring, example: http://somedoamin.com/project/v2.1/ http://somedoamin.com/project/v3.0/ Change return of _vercmp from True/False to -1/0/1 to provide test when current directory is equal to newer directory this helps to scan the same directory to get minor versions, example: http://somedoamin.com/project/v2.1/project-v2.1.2.tgz http://somedoamin.com/project/v2.1/project-v2.1.6.tgz (Bitbake rev: 5f7c5eb218a221165f59a0f4dd48d2d97f756193) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring _check_latest_version improvmentsAníbal Limón2015-02-161-26/+25
| | | | | | | | | | In order to reduce code duplication now compile package_regex in _init_regexes instead of make this decision at _check_latest_version, (Bitbake rev: e7284e3ad0e7dd91ed59dfbf8450ef62e89c7e54) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: wget latest_versionstring improve _parse_pathAníbal Limón2015-02-161-20/+24
| | | | | | | | | | | Add support for get group only if exist in regex, this enables to use this function in _check_latestversion regardless if the regex is generic or specified by REGEX_URI. (Bitbake rev: 1127af5b8c458929c4685b0326f86870ed09442e) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/fetch2/wget.py: latest_versionstring escape packagename when ↵Aníbal Limón2015-01-211-1/+1
| | | | | | | | | | | | | | | built regex 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. (Bitbake rev: 1aa1de4b0c5bd34466e04844bbc371933736be59) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: Fix horrible temp file handlingRichard Purdie2014-12-251-2/+1
| | | | | | | | | | Hardcoding a temp directory is bad practice and leads to races between the tests. There is no longer any good reason for doing this, drop it and ensure the files get cleaned up correctly. (Bitbake rev: 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/fetch2/wget.py: latest_versionstring fix multithread and remove ↵Aníbal Limón2014-12-231-17/+13
| | | | | | | | | | | | | | | deprecated code In order to fix multithread usage of latest_versionstring moves package_custom_regex_comp from class to method level because need to be defined by package. Remove code for build url's with /download suffix because it's deprecated since you can specify the download directory using package_regex.inc file. (Bitbake rev: 231cae9f9b552ec6737795c098d1de426b5adcbc) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring clean improvments minorAníbal Limón2014-11-281-3/+2
| | | | | | | | | | | | Update documentation strings in _check_latest_dir and _check_latest_version methods with the correct return types. _check_latest_version method remove unused testversion variable. (Bitbake rev: e30c11af7bc8a1f3d8c9198ee3c0065bd6b447cc) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring remove newuri set because is ↵Aníbal Limón2014-11-281-2/+0
| | | | | | | | | previous set (Bitbake rev: d2890c8868281cb7d89a8dc66e5db589cddb3363) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring add support for search in RAW html ↵Aníbal Limón2014-11-281-1/+6
| | | | | | | | | | | | lines Some upstream sites put the name of the package in the body of href tags, i.e. <a href="#43">somepackage-v1.4.10.tar.gz </a>. (Bitbake rev: 4fa8542a8880d5749fbb3382706e011b012024d0) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring remove unnecessary usage for name ↵Aníbal Limón2014-11-281-2/+2
| | | | | | | | | in version comparision (Bitbake rev: 91b6b38ccee5e9d5bb27e4cd1578356c3b3dc607) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring improvments in searchingAníbal Limón2014-11-281-14/+23
| | | | | | | | | | | | | | Validate if package contain version string if not return the current version cases for spectrum-fw and corpus recipes. _check_latest_version return the latest version available don't take into account the current version previous this only return the upstream version if it greater than the current version. (Bitbake rev: 91a7ac8c7f87f98e366585cf9720ec35b0790bae) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring add package_custom_regex_compAníbal Limón2014-11-281-4/+11
| | | | | | | | | | | package_custom_regex_comp is built with the current package name and then used to search upstream version this reduces custom regex'es in sites that have different packages in the same directory. (Bitbake rev: a69d5d48c4bf9a3df3121cc4e69ba5d7e947ad8d) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: Improve REGEX_URI handlingAníbal Limón2014-11-281-26/+29
| | | | | | | | | | Latest version string only try to find latest directory when REGEX_URI isn't specified to avoid unnecessary processing and makes code easier (Bitbake rev: afc33ec7cdb7d8ee3602a23fa973551ca5510ac4) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: _init_regexes rename variables to be more consistent ↵Aníbal Limón2014-11-281-12/+18
| | | | | | | | | and move dirver_regex into it (Bitbake rev: 583e5d9c1c3cb8a25d34648078200faadc597e9c) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: latest_versionstring create _init_regex method for have ↵Aníbal Limón2014-11-281-5/+10
| | | | | | | | | one place when regex'es are defined (Bitbake rev: 6989193a875afd0b1f0f88c95e28cb81bfdb4eaf) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: Add latest_versionstring methodAníbal Limón2014-11-121-0/+239
| | | | | | | | | | | | | | | | | | | | | | | Being able to query whether updated versions of a url are available is useful, not least for the package reporting system. Since such code is closely linked to the url type and the url itself, the fetcher makes a locical place to contain this code. For wget based urls this means taking upstream directory listings and searching those for later versions, returning those that are found. The patch also adds unittests for this function so that if improvements are made, the original test urls can be used to evaulate the those changes. This is based on code from Irina Patru <irina.patru@intel.com>. (Bitbake rev: a8272e22b7819e0e8afd8e291d276f5f28fc0007) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: Fix downloadfilename functionalityRichard Purdie2014-03-091-2/+2
| | | | | | | | | | | Some of the previous cleanups broke the downloadfilename functionality. This change fixes the code to ensure the commandline is correctly built. Thanks Kristof Robot <krirobo@gmail.com> for reporting the issue. (Bitbake rev: e008d9bb07e5d1a3584cc04ca2cd3dd906fd5759) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/wget: Separate out download and checkstatus functionsRichard Purdie2014-03-021-13/+19
| | | | | | | | These two functions have little in common, separate them out. (Bitbake rev: 7413e0fa4dca9571ea98f32dab87d4fd60bc8de9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>