[bitbake-devel] [PATCH] fetch2: BB_ALLOWED_NETWORKS should not care about port numbers

Olof Johansson olof.johansson at axis.com
Fri Apr 1 14:49:48 UTC 2016


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.

Signed-off-by: Olof Johansson <olof.johansson at axis.com>
---
 bitbake/lib/bb/fetch2/__init__.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 288a1c8..5763a80 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1028,6 +1028,7 @@ def trusted_network(d, url):
     if not network:
         return True
 
+    network = network.split(':')[0]
     network = network.lower()
 
     for host in trusted_hosts.split(" "):
-- 
2.1.4




More information about the bitbake-devel mailing list