summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-09-16 16:36:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 23:19:42 +0100
commitb2e2a7426cf042de2c58356c1faec2481beb7aac (patch)
tree8d728c12c35d3129562ba2fad7793f50f914ee50 /bitbake/lib/bb/tests
parent524417d587712fdb2a997210f0cbaa1a96752dfd (diff)
downloadpoky-b2e2a7426cf042de2c58356c1faec2481beb7aac.tar.gz
bitbake: fetch2/wget: fallback to GET if HEAD is rejected in checkstatus()
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: b993d96203541cd2919d688559ab802078a7a506) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6ec70d5d2e330b41b932b0a655b838a5f37df01e) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests')
-rw-r--r--bitbake/lib/bb/tests/fetch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 7a08be0f49..3b74de0d70 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -737,6 +737,8 @@ class FetchCheckStatusTest(FetcherTest):
737 "ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz", 737 "ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz",
738 "ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz", 738 "ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
739 "ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz", 739 "ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz",
740 # GitHub releases are hosted on Amazon S3, which doesn't support HEAD
741 "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz"
740 ] 742 ]
741 743
742 if os.environ.get("BB_SKIP_NETTESTS") == "yes": 744 if os.environ.get("BB_SKIP_NETTESTS") == "yes":