From 9f22898e0f9155a75c6b6f44869b129e505910e8 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 20 Jan 2016 13:10:25 +0000 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/fetch.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb/tests/fetch.py') 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): "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": -- cgit v1.2.3-54-g00ecf