mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
bitbake: fetch2: obey BB_ALLOWED_NETWORKS when checking network access
[YOCTO #10508] (Bitbake rev: ddd3bc2d64d7240ecb6b6e4a1ae29b1faef6cc22) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4e48892b85
commit
38438b6cf4
@@ -856,12 +856,15 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
|
||||
|
||||
return output
|
||||
|
||||
def check_network_access(d, info = "", url = None):
|
||||
def check_network_access(d, info, url):
|
||||
"""
|
||||
log remote network access, and error if BB_NO_NETWORK is set
|
||||
log remote network access, and error if BB_NO_NETWORK is set or the given
|
||||
URI is untrusted
|
||||
"""
|
||||
if d.getVar("BB_NO_NETWORK") == "1":
|
||||
raise NetworkAccess(url, info)
|
||||
elif not trusted_network(d, url):
|
||||
raise UntrustedUrl(url, info)
|
||||
else:
|
||||
logger.debug(1, "Fetcher accessed the network with the command %s" % info)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user