aboutsummaryrefslogtreecommitdiffstats
path: root/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:35 +0000
commit6ec70d5d2e330b41b932b0a655b838a5f37df01e (patch)
tree9c8fc24a2cc444c6b2b3933bea160c832ef4ef60 /lib/bb/tests/fetch.py
parent5685feb51fbb6d54fde6027cc765b9edd8eda65a (diff)
downloadbitbake-contrib-6ec70d5d2e330b41b932b0a655b838a5f37df01e.tar.gz
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/fetch.py')
-rw-r--r--lib/bb/tests/fetch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index b175a4328..81b22d025 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -738,6 +738,8 @@ class FetchCheckStatusTest(FetcherTest):
"ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz",
"ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
"ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz",
+ # GitHub releases are hosted on Amazon S3, which doesn't support HEAD
+ "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz"
]
if os.environ.get("BB_SKIP_NETTESTS") == "yes":