summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/fetch.py
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-01-20 13:10:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-26 22:34:45 +0000
commit9f22898e0f9155a75c6b6f44869b129e505910e8 (patch)
treee118952bf5154c8dafcabe885ae9fa2bb2dfa922 /bitbake/lib/bb/tests/fetch.py
parentd11cc29758a07b65a773765208ab3b95dcbe4bf4 (diff)
downloadpoky-9f22898e0f9155a75c6b6f44869b129e505910e8.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: 6ec70d5d2e330b41b932b0a655b838a5f37df01e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/fetch.py')
-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 b175a43280..81b22d025f 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -738,6 +738,8 @@ class FetchCheckStatusTest(FetcherTest):
738 "ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz", 738 "ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz",
739 "ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz", 739 "ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
740 "ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz", 740 "ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz",
741 # GitHub releases are hosted on Amazon S3, which doesn't support HEAD
742 "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz"
741 ] 743 ]
742 744
743 if os.environ.get("BB_SKIP_NETTESTS") == "yes": 745 if os.environ.get("BB_SKIP_NETTESTS") == "yes":