summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch2: print checksums when they are different then expectedMartin Jansa2012-08-021-0/+6
| | | | | | | | | | | | | | | | * in form which can be copied into a recipe without modification * like oe-classic did since: http://git.openembedded.org/openembedded/commit/?id=68abc465559a68e9201c9525be3c4acc6297eaed * it shows them in right form when they are missing completely, but in more verbose form when different * it needs to print that only when checksums were requested, e.g. fetching from sstate mirror sets both md5mismatch and sha256mismatch, but your checksums shouldn't be shown (Bitbake rev: 9eb34fc866775fd8310759a0111f232a9dc98981) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: handle broken symlinks in local mirror handlingChristopher Larson2012-08-021-1/+5
| | | | | | | | | | | | If a file:// mirror is being used, the fetcher will create a symlink to the local file. However, if the local file gets removed, that link will be dead, and os.path.exists() returns False in that case, so it tries and fails to recreate the link. Now we unlink such a dead link if it exists. (Bitbake rev: 229ed3857e826e3e215e843cb51f729c1e13ed37) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Add NoChecksumError exceptionMark Hatle2012-08-021-1/+13
| | | | | | | | | | | | | | | | Without the new exception, when the system is configured to use premirrors, but not allow network access (via BB_NO_NETWORK), when a recipe was lacking a checksum the wrong error message(s) were being generated. Instead of complaining about trying to perform network access, if the system was able to find the item in the premirror, it should inform the user of the lack of checksums, and the two SRC_URI fields they should use to update their recipe. (Bitbake rev: cb10e9c03a3f96d94e27e18330009616dde5e2b3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not ↵Andrei Gherzan2012-07-111-0/+4
| | | | | | | | | | | "protocol" As well, if "proto" is used, get the associated value as "protocol" (Bitbake rev: 53e6b630f0463d2d07cdaa9c9eb36794dc9b6b69) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Revert the regexp removal for the type field and instead ↵Richard Purdie2012-06-281-9/+8
| | | | | | | | | | | | | | anchor regexp People are using regexps in the url type field so we need to preserve this bitbake behaviour. To address the issues with https:// urls mapping badly to file:// urls we anchor the regexp if its not already anchored. There should be no expressions in the wild which would break with this change. (Bitbake rev: ce0579dc256251e523c6330641f98b9f5a0e5761) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure star character doesn't end up in mirror tarball namesRichard Purdie2012-06-251-1/+1
| | | | | | | | | | | | If '*' does end up in mirror urls accidently, some strange things can break since supports_checksum() looks for this, ud.localpath can then get ignored and this can lead to empty directories being downloaded "successfully". '*' is a special case for file urls only at this point so remove any entries that accidentlly make it in through url mapping. (Bitbake rev: 1369bec2404d942acc3618a8d005ec6868dcfd41) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add new mirror syntax to simplify mirror specificationsRichard Purdie2012-06-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | When writing mirror specifications, the current regexp syntax can be awkward and hard to get it to do what you want. For example, extracting the 'basename' of a repository: PREMIRRORS = "git://.*/([^/]+/)*([^/]*) git://somewhere.org/somedir/\\2;protocol=file" can now become: PREMIRRORS = "git://.*/.* git://somewhere.org/somedir/BASENAME;protocol=file" which is much clearer. A MIRRORNAME substitution is also added which contains an encoded form of both host and path. One of the problems with the existing regexp syntax is you couldn't access HOST information from PATH and vice-versa which is an issue this patch also addresses. Tests for the new syntax are also added. (Bitbake rev: c6b1acbad7b3d2698530eb8b5249adb4ab95da21) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Handle errors orruring when building mirror urlsRichard Purdie2012-06-251-2/+11
| | | | | | | | | | | | When we build the mirror urls, its possible an error will occur. If it does, it should just mean we don't attempt this mirror url. The current code actually aborts *all* the mirrors, not just the failed url. This patch catches and logs the exception allowing things to continue. (Bitbake rev: c35cbd1a1403865cf4f59ec88e1881669868103c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Update replace_uri to handle uri types explicitlyRichard Purdie2012-06-211-0/+6
| | | | | | | | | | | | | | For mirror mapping, we never use regexps for the type component of the url. Doing so causes various slightly bizarre behaviour such as https:// urls being translated to files:// urls which we have no handler for. This patch forces the type matches to be direct, not regexp based and gives the expected bahvriour. (From Poky rev: 695d8aca0999d2d61970b990e83c3132ba6f12cb) (Bitbake rev: 604df1b25cf114e083f52917df2df64e01279c25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: uri_replace() only consider ud.localpath where its a fileRichard Purdie2012-06-211-1/+1
| | | | | | | | | | | | Using ud.localpath as a basename when it points at a directory causes problems. The supports_checksum() method gives a good indication of whether ud.localpath can be used in the way we need. (From Poky rev: 933ec8a44634e33f92f6f76de3a34094c3d63aa6) (Bitbake rev: dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: uri_replace() improve mirrortarball handlingRichard Purdie2012-06-211-1/+4
| | | | | | | | | | | | We only consider mirror tarballs when the source and target urls are of differing types. We also should clear all url paramters when handling mirror tarballs. (From Poky rev: da140b8b0b3dda5429f9eee68829ef5247cdfe12) (Bitbake rev: 7619dcad29a6c2405b15a8fbadfa11e81b399ae1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: uri_replace() remove what amounts to a null operation and ↵Richard Purdie2012-06-211-2/+2
| | | | | | | | | | add some comments (From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc) (Bitbake rev: e67af4d12f390ce6083965509ca9ea85a76dc351) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Add parameter handling to uri_replace()Richard Purdie2012-06-211-1/+9
| | | | | | | | | | | | This means that parameters in the source expression are used as part of the match. Parameters in the destination are used explicitly in the final url. (From Poky rev: c465cb0c5c927dd41d96ad6d6fa1566349574bb7) (Bitbake rev: 3c468ac3ed6d045561afce19b85ae9dd18d87cea) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Remove basestring test and simplify uri_replaceRichard Purdie2012-06-211-17/+18
| | | | | | | | (From Poky rev: d5657883d34bfef6beec594ac8d799f617b6b3ad) (Bitbake rev: 84ffc261f376429b3a6b5d7bf2f6217cd10ca12a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Simplify some looping constructs in uri_replace()Richard Purdie2012-06-211-3/+2
| | | | | | | | (From Poky rev: c6bd25150a842a530f958d7233b15ae50d42c6c8) (Bitbake rev: 075296f3e5e5e3662290a888a6ba11229a36b95a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Improve mirror looping to consider more casesRichard Purdie2012-06-211-12/+29
| | | | | | | | | | | | | | | | Currently we only consider one pass through the mirror list. This doesn't catch cases where for example you might want to setup a mirror of a mirror and allow multiple redirection. There is no reason we can't support this and the patch loops through the list recursively now. As a safeguard, it will stop if any duplicate urls are found, hence avoiding circular dependency looping. (From Poky rev: 0ec0a4412865e54495c07beea1ced8355da58073) (Bitbake rev: e585730e931e6abdb15ba8a3849c5fd22845b891) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Explicitly check for mirror tarballs in mirror handling codeRichard Purdie2012-06-211-1/+2
| | | | | | | | | | | | With support for things like git:// -> git:// urls, we need to be more explicity about the mirrortarball check since we need to fall through to the following code in other cases. (From Poky rev: 28e858cd6f7509468ef3e527a86820b9e06044db) (Bitbake rev: a2459f5ca2f517964287f9a7c666a6856434e631) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Split try_mirrors into two partsRichard Purdie2012-06-211-52/+59
| | | | | | | | | | There are no functionality changes in this change (From Poky rev: d222ebb7c75d74fde4fd04ea6feb27e10a862bae) (Bitbake rev: db62e109cc36380ff8b8918628c9dea14ac9afbc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure when downloading we are consistently in the same ↵Richard Purdie2012-06-211-1/+5
| | | | | | | | | | | | | | directory This assists with build reproducuility. It also avoids errors if cwd happens not to exist when we call into the fetcher. That situation would be unusual but I hit it with the unit tests. (From Poky rev: 86517af9e066c2da1d580fa66b7c7f0340f3403e) (Bitbake rev: b886c6c15a58643e06ca5ad7a3ff1f7766e4f48c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Only cache data if fn is set, its pointless caching it ↵Richard Purdie2012-06-211-2/+2
| | | | | | | | | | against a None value (From Poky rev: c2df30bf6d1f8c263a38c45866936c1bf496ece5) (Bitbake rev: f4b59cc6e1c3ddc168a1678ce39ff402ea1ff4cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix error handling in uri_replace()Richard Purdie2012-06-211-1/+2
| | | | | | | | (From Poky rev: 1bfba28a583cb167f60e05ecdf34d0786dc1eec5) (Bitbake rev: aa7467a764ddcbc7d65af99e88cf093b6ec6d24e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__: Make it clearer when uri_replace doesn't return a ↵Richard Purdie2012-06-211-2/+4
| | | | | | | | | | match (From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc) (Bitbake rev: eb96609864dec95a516e6e687dd6a2f31d523acf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Fix missing output from stderr in fetcher logsJason Wessel2012-06-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are actually two problems to fix 1) The exception for bb.process.ExecutionError must be processed first because it is a derived from the bb.process.CmdError class and we never reach the ExecutionError otherwise. 2) The stderr needs to be printed as well as stdout to determine the root cause of a fetch failure. The example I have is that I got a log that looked like: -- ERROR: Function failed: Network access disabled through BB_NO_NETWORK but access requested with command /usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P /localds 'http://downloads.yoctoproject.org/[...CLIPPED...] url None) -- That really didn't tell me much, but with this patch I get error above plus the following: -- STDERR: /net/[...CLIPPED...]kernel-tools.git: Read-only file system -- (Bitbake rev: af2133a04e1f4b22b181adf9c71f89c439bb88cf) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/bb/fetch2: ignore remote URIs when doing file checksumsPaul Eggleton2012-05-301-6/+20
| | | | | | | | | | | | | | | | Skip evaluating remote URIs when doing local file checksums, because we don't need to process them and doing so will trigger a parse failure if SRCREV is not fully specified. Whilst this is just delaying a check until runtime (when do_fetch runs for the recipe) we're only validating this here accidentally and if we did wish to check it during parsing it ought to be done explicitly. Fixes [YOCTO #2512] (Bitbake rev: 99feb77c2de707f2d825566cf48371c48f450e3e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/bb/fetch2: fix comments for verify_checksumPaul Eggleton2012-05-251-6/+3
| | | | | | | | | | This function no longer returns a value, it raises errors instead, so update the comments to reflect this. (Bitbake rev: 8b61b9584a8b00378f9fd8f165dbd65dcfd3c14e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: implement checksums for local files in SRC_URIPaul Eggleton2012-05-231-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | Gathers a list of paths to have checksums calculated at parse time, and processes these when calculating task hashes. Checksums are cached with the file's current mtime. Thus, changing any local file in SRC_URI will now cause the do_fetch taskhash to change, thus forcing a rebuild. This change adds very roughly about an 8% increase in parse time (a few seconds) and maybe a few seconds during runqueue generation, so a fairly moderate performance hit. Note that since paths are resolved at parse time, this will not force a rebuild when files are introduced which would cause that resolved path to be different - for example, where a machine-specific version of a file was added without otherwise changing the recipe. This will need to be handled in a future update. Code to hook this into the signature generator was courtesy of Richard Purdie <richard.purdie@linuxfoundation.org>. Implements [YOCTO #2044]. (Bitbake rev: c993b7c457f8b7776e8a5dff253bfa0724bc2cae) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: quote/unquote url pathsChristopher Larson2012-05-221-3/+4
| | | | | | | | | | This ensures we can handle things like %-encoded characters in the path portion of urls. (Bitbake rev: b1dbc24ebcc4e5100c32568c2c41fd982fb4bcce) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Also exclude urls containing wildcards from checksumming for nowRichard Purdie2012-05-221-0/+2
| | | | | | | | | Without this change, bitbake will try and checksum a wildcard which will lead to fetch failures. (Bitbake rev: ac53b88be58b0bed21730c0b61a8fc8e801a2f1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bb/fetch2/__init__.py: Don't try to compute checksums for directoriesAndrei Gherzan2012-05-211-0/+5
| | | | | | | | | | | | In this way we avoid failing the build while trying to fetch local directories. [YOCTO #2475] (Bitbake rev: 39adb5741d9eee0879d3181be505400dffc60804) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch: Spell out which fetcher backends support and recommend checksumsRichard Purdie2012-05-201-1/+21
| | | | | | | | | | | | | | There were some hardcoded behaviours in the system for which backends support checksums verses which backends recommend them verses which don't recommend them. This moves the functionality into specific fetchers and then makes the general code generic. This cleans up the codebase and fixes some corner cases such as trying to checksum directories returned by the git fetcher. (Bitbake rev: ef6d268f7b8527541a7fb044cf95a973be4097f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch: If checksums are available, check them for any file, local or ↵Richard Purdie2012-05-201-21/+19
| | | | | | | | | | | | | remote Currently, checksums are only checked for remote files. This changes the check to apply to any file we have checksum data for. A mismatch against a file is fatal but in the local case, no warnings are shown about missing checksums. (Bitbake rev: 80411b3acf2173a4a7d415102d16676eb98363e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Improve visibility of checksum warnings when fetching from ↵Richard Purdie2012-05-201-5/+15
| | | | | | | | | | | | | mirrors When fetching from mirrors, checksum errors would get buried in the logs. This raises their profile so a warning is logged on the console when fetcher checksum issues are encountered, even if other attempts are made to get the file (which may or may not have the same issue). (Bitbake rev: d43fafd7f01b5534499b45213197d8ccececdbc4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Improve stamp creation in mirror codeRichard Purdie2012-05-201-4/+4
| | | | | | | | | | | | | | | Under certain contitions such as local file:// mirrors of all files, bitbake might not check checksums. This is not desirable and we should always check the checksum where possible. This only exception to this is the git mirror tarball case where the checksum is unknown but we need to create the .done stamp for other reasons. This patch preserves thta functionality but in a more specific section of code where this doesn't interfere in normal checksums. (Bitbake rev: 2592a43e422c06a6f6174ada562e9c8ba25e1ec1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Remove hardcoded file removal and use clean methodRichard Purdie2012-05-201-4/+2
| | | | | | | | | | | | | | | Under certain circumstances, bitbake could remove files which were outside its control since it unconditionally removes ud.localpath. In the file:// case this can point at external paths. This patch converts it to use the clean() method which will remove files when its safe to do so but not in the file:// case since the file:// handler has an empty clean method. This means bitbake no longer removes files outside its control and is generally much safer. (Bitbake rev: 9ad1cebe2220b41da2141cdb3f0a403abb46d77c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: When unpacking, only use PATH variable if its setRichard Purdie2012-05-071-1/+3
| | | | | | (Bitbake rev: ffec38675c0d78ee9fcd1d8f5a746d162145554e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Remove WORKDIR reference, should use passed parameterRichard Purdie2012-05-071-1/+1
| | | | | | (Bitbake rev: 9384dfaf644365c731be26572443287ce8f190b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix spelling error in network access error messageJeff Polk2012-05-041-1/+1
| | | | | | | (Bitbake rev: b766630ed7e099fffe817928a2811272677a1b26) Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Hob: add fadeout display effection for recipe view include pageLiming An2012-04-111-3/+4
| | | | | | | | | | | | | | As UI request, in recipes selection page, if user exclude a item, the related depends recipes will be excluded together,so the view clearly to add it. [YOCTO #2100] (Bitbake rev: c9eed04c6275ef2c694f89e047f85c7de76f89b6) Signed-off-by: Liming An <limingx.l.an@intel.com> Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Ensure mirror tarballs have .done stamps so we don't ↵Richard Purdie2012-03-231-0/+1
| | | | | | | | | | redownload and corrupt them [YOCTO #2154] (Bitbake rev: 521d6b14151d3bf934b9597557f7ae46e50a3d7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: Fix typo which broke use of tarballsGary Thomas2012-03-161-1/+1
| | | | | | | (Bitbake rev: 5a1e62a8cdd4f0253b0dc59046b3b4c3186af461) Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch: Fix uri_replaceRichard Purdie2012-03-151-6/+7
| | | | | | | | | | | | | We were seeing duplicate endings to urls: DEBUG: For url ['http', 'www.apache.org', '/dist/subversion/subversion-1.7.1.tar.bz2', '', '', {}] comparing ['http', 'www.apache.org', '/dist', '', '', {}] to ['http', 'archive.apache.org', '/dist', '', '', {}] DEBUG: For url http://www.apache.org/dist/subversion/subversion-1.7.1.tar.bz2 returning http://archive.apache.org/dist/subversion/subversion-1.7.1.tar.bz2/subversion-1.7.1.tar.bz2 This patch addresses this by only performing substitutions when really needed. (Bitbake rev: a17473d51f54a9dfb4eeaa5ad516c4851d5ac142) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* stderr would previously be appended to stdout, corrupting the result when ↵Adrien Bustany2012-03-021-23/+17
| | | | | | | | | something was outputed to stderr but exit code was still 0 (non-fatal warning messages). This commit makes the code parse only stdout, but output stderr if an error happened. (Bitbake rev: 4a480a052f450c4ee061ab0e60a495a45f140cf9) Signed-off-by: Adrien Bustany <adrien.bustany@nokia.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: allow resuming interrupted fetchPaul Eggleton2012-01-201-3/+3
| | | | | | | | | | | | | | | | | A lot of our checks in the fetcher code assume that if the downloaded file exists, the download finished successfully; this meant that if BitBake was interrupted in the middle of a fetch then it would not resume the fetch the next time, but instead attempt to use the half-fetched file and usually fail as a result. Since we're already writing a ".done" stamp file when a fetch completes, just check for its existence and assume the download didn't complete successfully if it isn't present. (Bitbake rev: 721e986624529aedef96dd06c9fe6243f2897b10) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: reduce output for fetch failuresPaul Eggleton2012-01-151-1/+6
| | | | | | | | | | | | | | | | | | | Make the warning for the initial fetch failure a single line - we don't need the full command and output here yet, but write it into the log in full as a debug message. However, if fetching from mirrors fails as well then print out the full details for the first error that occurred as an ERROR rather than a WARNING. Since this is logged as an ERROR, combined with an earlier patch it suppresses the full log which does make the output much more readable for any fetch error. Fixes [YOCTO #1832]. (Bitbake rev: 6bbdc7d259c0cc041b62dbdb26cfc3ec6edcb6f3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: correctly decode exit signal/statusPaul Eggleton2012-01-151-4/+7
| | | | | | | | | | | | | The termination signal and exit code of the fetch process were not being decoded correctly, resulting in bitbake reporting that the process terminated with a signal of the exit code (if it was under 255). There are functions in the Python os module to do this decoding correctly (for Unix at least), so let's use them. (Bitbake rev: 50aea9a76e40cf71cc3f1462c88298e4846a031c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/fetch2: improve error formatting for fetcher errorsPaul Eggleton2012-01-151-4/+7
| | | | | | | | | | | | | | | * The "name" argument to FuncFailed is rarely used as a name in actual usage within bitbake, so don't treat it as one in the output. * Don't print URL for FetchError if it was not specified (i.e. don't output "Fetcher failure for URL 'None'") * Don't include URL in "unable to fetch from any source" message since we supply it to FetchError and it will be printed anyway. * Don't include URL in "checksum failed" message for the same reason (Bitbake rev: 86811bd85e2e453ee92a05fe60160d9b49ac69e8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabledJoshua Lock2011-12-051-3/+3
| | | | | | | | | | | | BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url. (Bitbake rev: b8b2f4287c9125542b18a294c0a94ed89a7e73a8) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-271-39/+39
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: Improve uri_replace to handle paths with no trailing '/'Richard Purdie2011-11-241-3/+10
| | | | | | | | | | | | | | | | | | | | | | Currently if you specify a mirror like: file://.* http://linux.freescale.net/yocto/sstate-cache it won't work as you expect whilst: file://.* http://linux.freescale.net/yocto/sstate-cache/ will since it has the trailing slash. This patch handles both cases correctly. It also adds some debug to the uri_replace function since its near impossible to debug it without some kind of output. [YOCTO #1578] (Bitbake rev: a0246bf09c93bb657eaf6ba61d090b247ed33640) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* fetch2: enable checksum definition as SRC_URI parameterJoshua Lock2011-10-241-2/+8
| | | | | | | | | | | | | | | | URI parameters should be able to be defined as a parameter of the SRC_URI, this patch enables thus for checksums. An example; SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz;md5sum=a3270bab3f4b69b7dc6dbdacbcae9745;sha256sum=3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e" Addresses the remainder of [YOCTO #1399] (Bitbake rev: 5f8f923b76722c9b6c7ffbe19e94df50f900155f) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>