summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: Replace deprecated git branch parameter "--set-upstream"krogoth-nextAndre Rosa2017-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Since 2017-08-17 (git version 2.14.1.473.g3ec7d702a) using deprecated git branch parameter "--set-upstream" causes a fetcher error. Replace it by "--set-upstream-to". https://git.kernel.org/pub/scm/git/git.git/commit/?id=52668846ea2d41ffbd87cda7cb8e492dea9f2c4d says, it's deprecated since 2012-08-30 so hopefully all still supported host distributions have new enough git to support "--set-upstream-to". ERROR: PACKAGE do_unpack: Fetcher failure: ...; git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master failed with exit code 128, output: fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead. ERROR: PACKAGE do_unpack: Function failed: base_do_unpack (Bitbake rev: 62a53e9dbb6dc7489e44c32340b0caddd4596f0a) Signed-off-by: Andre Rosa <andre.rosa@lge.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2ab50074c1a6c56a8a178755de108447d7b7acaf) Signed-off-by: Javier Viguera <javier.viguera@digi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/wget: attempt checkstatus again if it failsRoss Burton2017-05-181-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) (Bitbake rev: 0b48acbf0428975e67012877417b9f90d3e1778c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Hand applied Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: copy files with -HEnrico Scholz2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | When using a PREMIRROR with plain (non-unpack) files, a SRC_URI like SRC_URI = "file://devmem2.c" will cause devmem2.c to be a symlink in the WORKDIR pointing to the local PREMIRROR. Trying to apply a patch on this file will either modify the file on the PREMIRROR or will fail due to sanity checks: ERROR: devmem2-1.0-r7 do_patch: Command Error: 'quilt --quiltrc /cache/build-ubuntu/sysroots/x86_64-oe-linux/etc/quiltrc push' exited with 1 Output: Applying patch devmem2-fixups-2.patch File devmem2.c is not a regular file -- refusing to patch (Bitbake rev: e82862ba8fedb2c5cd478c731b3d259d16c6e3d8) Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Safer check for BB_ORIGENV datastoreLeonardo Sandoval2016-06-291-1/+2
| | | | | | | | | | | | | | | | | BB_ORIGENV value on the datastore can be NoneType thus raising an AttributeError exception when calling the getVar method. To avoid this, a check is done before accesing it. [YOCTO #9567] (Bitbake rev: f368f5ae64a1681873f3d81f3cb8fb38650367b0) (Bitbake rev: 25859009b710cb35ac8f9ee9eb3a7305f9e13402) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication ↵Ross Burton2016-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | agents Some users may want to use authenticated SSH connections with credentials stored in a keyring, such as gnome-keyring. These typically need a DBus session bus connection, so pass DBUS_SESSION_BUS_ADDRESS into the fetcher environment. To avoid the user needing to set it in their local.conf (which wouldn't be usable) or adding it to the environment-cleansing whitelist (which would potentially impact builds) allow the variables being passed to the fetchers to come from the data store (first) or the original environment (second). >From bitbake master rev: 20ad1ea87712d042bd5d89ce1957793f7ff71da0 (Bitbake rev: 26379ff2b686313c82af87a3a35b47adbc0183be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: remove .indirectiondir workaroundRobert Yang2016-04-061-17/+1
| | | | | | | | | | | It was used for workaround git 1.7.9.2 which was released in 2012 which should not be existed on nowadays host, so remove it to avoid confusions. (Bitbake rev: 6140d0cc9aecf1029ca16fed47071dfcc92f4269) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: BB_ALLOWED_NETWORKS should not care about port numbersOlof Johansson2016-04-031-0/+1
| | | | | | | | | | | | | | | | | Bitbake would fail to classify the following URL as belonging to a allowed network, because of the port number in the url. BB_ALLOWED_NETWORKS = "*.example.com" SRC_URI = "http://git.example.com:8080/foo.tar.gz" Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable, it's reasonable to believe that this should work regardless of protocol being used. (Bitbake rev: ff603df23037e10fb2cfdf150429cba3f65072cd) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Ensure that incorrect checksumed files are always renamedRichard Purdie2016-03-311-8/+21
| | | | | | | | | | | | | | There are some codepaths where the file checksum is verified and can be found to mismatch but the 'rename' logic doesn't kick in. If code relies on the presence of a file for the checksum having been checked (e.g. uninative.bbclass) then it can be used when the checksum hasn't matched. Therefore rename the file whenever an invalid checksum is encountered. (Bitbake rev: 69ef6c8a9db02bfa0e3fac72481ec26586a29a01) 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: Handle lockfiles for file:// urls redirected to mirrorsRichard Purdie2016-03-261-0/+8
| | | | | | | | | | | | | | | | | We recently dropped lockfiles for file:// urls which in itself makes sense. If a file url redirects to something like an http:// mirror, we'd have no lock taken for the original file and could race against others trying to download the file. We therefore need to ensure there is a lock taken in the mirror handling code. This adds code to take such a lock, assuming it isn't the same lock as the parent url. (Bitbake rev: 913b6ce22cd50eac96e8937c5ffc704bfce2c023) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: fetch2/gitsm: Fix fetch when the repository contains ↵Derek Straka2016-03-261-5/+2
| | | | | | | | | | | nested submodules This fixes a problem when the repository contains multiple levels of submodules via a resursive submodule init. (Bitbake rev: dbafbe229360ffe5908b106a9c10e274712b9b17) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Make BB_DONT_CACHE variable externalMarkus Lehtonen2016-03-231-1/+1
| | | | | | | | | | | | | | This makes it possible to prevent a recipe to be cached, and thus, parsed every time. Use with care. [YOCTO #8853] (Bitbake rev: 78335c1fbe5266116700c2413aac28b00423a75b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: fix ud.registry so that alternative registries can be ↵Brendan Le Foll2016-03-121-1/+1
| | | | | | | | | | | | | | | handled Fixes [YOCTO #9231] npm when given an invalid registry URL with --registry actually goes and fetches from the default registry, but this commit makes sure it goes to the specified one. (Bitbake rev: 7c849be7c70a5db4f66fe3041486abb923b5e4ee) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their valuesPeter Kjellerstedt2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | For some reason, the values for SRC_URI[md5sum] and SRC_URI[sha256sum] were not being expanded. That lead to the following code not working as expected: SRC_URI = "http://.../${PN}-${PV}.tar.gz" MD5SUM = "123abc..." SHA256SUM = "abcd1234..." SRC_URI[md5sum] = "${MD5SUM}" SRC_URI[sha256sum] = "${SHA256SUM}" (Bitbake rev: ba011470df0ea8bd89f01c0b02ec4b3969e60ce7) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: add missing URL argument to ParameterErrorPaul Eggleton2016-03-091-2/+2
| | | | | | | | | | Without this you get a rather odd traceback instead of the proper exception message. (Bitbake rev: 2fe1826d3077eeda6cde433d3a1e6620f74e08dd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: properly handle npm dependenciesPaul Eggleton2016-03-091-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of "npm view dependencies" isn't entirely JSON if there are multiple results, but the code here was just discarding the output if the entire thing didn't parse as JSON. Split the output into lines and iterate over it, parsing JSON fragments as we find them; this way we end up with the last package's dependencies since it'll be last in the output. Digging further, it seems that the dependencies field reported by "npm view" also includes optional dependencies. That wouldn't be a problem except some of these optional dependencies may be OS-specific; for example the "chokidar" module has "fsevents" in its optional dependencies, but fsevents only works on MacOS X (and is only needed there). If we erroneously pull in fsevents, not only is it unnecessary but it causes "npm shrinkwrap" to throw a tantrum. In the absence of a better approach, look at the os field and discard the module (along with any of its dependencies) if it isn't for Linux. As part of this, we can reduce the calls to npm view to one per package since we get the entire json output rather than querying twice for two separate fields. Overall the time taken has probably increased since we are being more thorough about dependencies, but it's not quite as bad as it could have been. (Bitbake rev: 436d67fe7af89ecfbd11749a6ae1bc20e81f2cc8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: fix errors with some version specificationsPaul Eggleton2016-03-091-1/+1
| | | | | | | | | | | "2 || 3" is a valid version specification for a dependency in an npm package.json file, but of course that looks like something else when sent to a shell. Quote the version value to avoid this. (Bitbake rev: bea0246831a46d943d2e27d6b38f6e498bd3413c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: ignore unknown headers in tarballsPaul Eggleton2016-03-071-1/+1
| | | | | | | | | | | Tarballs that are fetched down via npm repositories seem to often have unknown headers. This doesn't affect our ability to extract the contents though so we don't really care to see those warnings. (Bitbake rev: b38975103e52a0c25e9ad9032c8cca1c47cbdcc2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: handle alternative dependency syntaxPaul Eggleton2016-03-071-1/+3
| | | | | | | | | | | | | npm allows you to specify a dependency as a Github username+path, or omit the version entirely. You can hit these if you don't use a shrinkwrap file, with the result that the code later fails due to the output of "npm view" being empty; so handle this lazily by just ignoring this part of the dependency if it's not really a version. (Bitbake rev: 7b7a65c44dbdd5ba9366d4e2093f76df8758d546) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: fix indentationPaul Eggleton2016-03-071-22/+22
| | | | | | | | | No code changes, just fix to use four spaces. (Bitbake rev: 66a9ee7d54ca9c25209f72da079f260ccdcc872a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: Add missing ParameterError importBrendan Le Foll2016-03-021-0/+1
| | | | | | | (Bitbake rev: b583a40c9086b3587065995d8cee45b7ea36c1b3) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: npm: in cases where shrinkwrap resolved a git URL, ignore it and ↵Brendan Le Foll2016-03-021-1/+1
| | | | | | | | | | | | | grab dist.tarball npm-shrinkwrap will sometimes resolve a git URL which instead of a http url, in this case go and grab the dist.tarball via npm instead of using the resolved URL. (Bitbake rev: eb53b927ff59aa19cf28bc46beb9f9a185a59990) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Fix unpack for absolute file urlsRichard Purdie2016-03-021-1/+4
| | | | | | | | | The previous commit breaks absolute pathnames in file:// urls, this fixes it. (Bitbake rev: b8113a1800687a37a26ac28deafdbafd74cc138e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: fixes copying of file://dir; subdir=foo, bug 6128 and bug 6129Alexander Shashkevich2016-03-021-37/+24
| | | | | | | | | | | | | | When in SRC_URI appears file://dir;subdir=foo unpacker copies 'dir' to ${WORKDIR}, not ${WORKDIR}/foo as it should be. These changes are fixing following bugs as well: Bug 6128 - Incorrect wildcard unpack behaviour in fetcher Bug 6129 - Local directories unpack to a different location than local files (Bitbake rev: e659a3b0c2771679057ee3e13cd42e6c62383ff2) Signed-off-by: Alexander Shashkevich <alex@stunpix.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: Enable fetcherRichard Purdie2016-02-281-0/+2
| | | | | | | | For some reason the enablement piece of the patch went missing, add it. (Bitbake rev: 0270b5a3873ed0aeca3a66198c87a6164fb644b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Skip lockfiles and donestamps for local filesRichard Purdie2016-02-282-4/+19
| | | | | | | | | | | | For local files, there are no races with downloads, we don't need ".done" stamps and we don't need lockfiles. This considerably cleans up DL_DIR and all the pointless ".done" files as well as removes stalls over local files with the same name. (Bitbake rev: 48e903745db578d9b9b425a8d411c1369df0eb94) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Error if lockfile path invalidRichard Purdie2016-02-281-1/+4
| | | | | | | | | Rather than create ".lock" and ".done" files with no name, error, forcing us to fix the cases where this is a problem. (Bitbake rev: 81158071508cc68c39db7d501370872f44d335cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__: Fix decodeurl to better handle urls without pathsRichard Purdie2016-02-281-2/+5
| | | | | | | | | | | | | | | | | | | | | If we specify urls such as npm://somehost;someparams the fetcher currently does a poor job of handling mirrors of these urls due to deficiencies in the way decodeurl works. This is because "somehost" is returned as a path, not a host. This tweaks the code so that unless its a file url, the host is returned correctly. This patch also adds test cases for these urls to the exist set of test urls. We need to tweak the URI() class since this thinks this is a relative url which is clearly isn't. We also need to handle the fact that encodeurl will error if passed a url of this form (it would want the path to be '/'. (Bitbake rev: 83203cd2e677706e0111892a7843b83263cb8bd9) 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: fetch2/npm: Add mirroring support for npm fetcherRichard Purdie2016-02-261-1/+30
| | | | | | (Bitbake rev: bff46c614d3f9cc18a1c8908c47842712e0e3a8c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/npm: Add npm fetcherBrendan Le Foll2016-02-261-0/+226
| | | | | | | | | | | | | | | | | npm fetcher with support for shrinkwrap files and lockdown files to easily download and install an npm package with strict dependency resolution. The SRC_URI should be in the format of: SRC_URI = "npm://registry.npmjs.org/;name=${PN};version=${PV}" To add a shrinkwrap and lockdown file use: NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json" NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json" (Bitbake rev: dec75bbc5d075acb322dad8b1c40d6bd518dc9fd) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: FileChecksumCache: add get_checksums() methodMarkus Lehtonen2016-02-181-44/+1
| | | | | | | | | | Move the local file checksum functionality from bb.fetch2 into bb.checksum module. (Bitbake rev: 4f60933283f377d68f191db849dac6c1dc7a0aed) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/cache: drop some unused argumentsMarkus Lehtonen2016-02-181-5/+5
| | | | | | | | | | Drop unused 'd' argument from the cache save methods, simplifying the API. (Bitbake rev: 81bc1f20662c39ee8db1da45b1e8c7eb64abacf3) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> 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/osc: Clean up old variable syntaxRichard Purdie2016-02-061-5/+5
| | | | | | | | Since people do copy and paste these things, clean up old syntax styles. (Bitbake rev: 4fb028b0bd14d3e4b3fd7a89c643528728566476) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/osc: Remove hardcoded urlRichard Purdie2016-02-061-1/+1
| | | | | | | | This shouldn't be in here, use a variable instead. (Bitbake rev: 2e25d09a1ab62ccc3573d13114d59838cf4b07f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Add expansion parameter to getVarFlagRichard Purdie2016-02-041-3/+3
| | | | | | | | | | | | | | | This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the expand default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` There should be no functional change from this patch. (Bitbake rev: 7c3b99c6a716095af3ffce0b15110e91fb49c913) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/gitsm: Fix when repository change submodulesFelipe F. Tonello2016-02-041-1/+1
| | | | | | | | | | | | | | This fix a problem when checking out a commit that changes the submodules previously checkout. Example: Recipe uses branch A and then it updates to use branch B, but branch B has different submodules dependencies then what branch A previously had. (Bitbake rev: 54a3864246f2be0b62761f639a1d5c9407aded4f) Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Simplify logic in verify_checksum()Peter Kjellerstedt2016-01-301-20/+10
| | | | | | | | | | | The recent change to verify_checksum() to only show checksum warnings if no checksums are supplied made it possible to simplify the logic a bit more. (Bitbake rev: 1dc00b874acae44bbba9d8028d94f7bc97ddcd76) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.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: fetch2: Don't show checksum warnings if a single checksum was suppliedRichard Purdie2016-01-241-3/+1
| | | | | | | | | | If one checksum is supplied to a SRC_URI, we really don't want to show warnings about the other type which isn't present as one checksum is really good enough for most cases. (Bitbake rev: 43358a9b595b2928458a5f463cf1949394160c3a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "fetch/git: Change to use clearer ssh url syntax for broken ↵Richard Purdie2016-01-151-4/+0
| | | | | | | | | | | servers" This reverts commit 4193e99adce8e88f12ac88d7578ad39575f7e346. It seems the underlying issue was caused by ":" in the url which isn't supported. The patch was therefore incorrect. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "fetch2/local.py: avoid using PREMIRROR"Richard Purdie2016-01-131-5/+0
| | | | | | | | | | | This reverts commit e130dca85bac82bd4d88f94a6bf9fe36e8ad4d7c. This is in fact a valid use case, for example the sstate.bbclass code sets up SSTATE_MIRRORS as PREMIRRORS. Its quite common to map those file:// urls to remote http:// urls and with the above change, this no longer works. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: Add missing "errno" module import.Kristian Amlie2016-01-111-0/+1
| | | | | | | | | | | | This goes undetected most of the time, but when updating a repository, if the ud.fullmirror file is not present, you end up getting an exception instead of carrying on because the errno module is not loaded (specifically "if exc.errno != errno.ENOENT"). (Bitbake rev: e6fca8480731ce817df9bee61438347a5e3d3017) Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch/git: Change to use clearer ssh url syntax for broken serversRichard Purdie2016-01-081-0/+4
| | | | | | | | | | | | | | | | | | | Some servers, e.g. bitbucket.org can't cope with ssh:// as part of the git url syntax. git itself is happy enough with this but you get server side errors when using it. This changes the git fetcher to use the more common ssh url format which also means we need a : before the path. Seems a shame to have to do this due to broken servers however it should be safe enough since this other form is the one most people use on the commandline so it should be safe enough. [YOCTO #8864] (Bitbake rev: 4193e99adce8e88f12ac88d7578ad39575f7e346) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/__init__.py: Add support for 7-ZipJuro Bystricky2016-01-061-0/+4
| | | | | | | | | | | | | | 7-Zip is a file archiver claiming the highest compression ratio. This patch allows using 7-Zip commpressed files in bitbake recipes. Two common formats are supported: SRC_URI = "file://abc.tar.7z" SRC_URI = "file://abc.7z" (Bitbake rev: 7120f5bfaae54e91bc95da5667831424724ce613) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/local.py: avoid using PREMIRRORRobert Yang2016-01-061-0/+5
| | | | | | | | | | The PREMIRROR isn't useful for "file://", so avoid using it, this is good for searching speed and can reduce useless lines in log.do_fetch. (Bitbake rev: e130dca85bac82bd4d88f94a6bf9fe36e8ad4d7c) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch: use orig localpath when calling orig methodChristopher Larson2015-12-181-1/+1
| | | | | | | | | | | | | | | | When a mirror tarball is fetched, the original fetch method is called, which unpacks the mirror tarball. After the original method is called, it checks the localpath of the mirror tarball rather than the clone path, which isn't ideal, particularly if the mirror tarball was removed due to being out of date. We know the original fetch method will do what it needs to do to get its content in the form it needs from the mirror tarball, so we can use its localpath instead. (Bitbake rev: 1732ad65d6c7d67b7d07cb30c074f5016adadbea) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: rename REGEX, REGEX_URI, and GITTAGREGEX.Alexander Kanavin2015-12-082-3/+3
| | | | | | | | | | | | 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>