diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-03-25 16:10:58 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-26 14:02:28 +0000 |
commit | b1641008f072ecd7b8843d80e0d3de6c0584129e (patch) | |
tree | a67608b989d118cbb216b849f2d803cbd013c8b4 /bitbake | |
parent | 64c21baf63ebf622eecf77dd35c8be6e5e9ee68b (diff) | |
download | poky-b1641008f072ecd7b8843d80e0d3de6c0584129e.tar.gz |
bitbake: fetch2: Use bb.utils.to_boolean() for BB_NO_NETWORK
Make it consistent with BB_FETCH_PREMIRRORONLY.
(Bitbake rev: 4c6013f47ef36b03f590c909d7c9a2f50b698620)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 64451846c7..8fecc809d4 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -898,7 +898,7 @@ def check_network_access(d, info, url): | |||
898 | log remote network access, and error if BB_NO_NETWORK is set or the given | 898 | log remote network access, and error if BB_NO_NETWORK is set or the given |
899 | URI is untrusted | 899 | URI is untrusted |
900 | """ | 900 | """ |
901 | if d.getVar("BB_NO_NETWORK") == "1": | 901 | if bb.utils.to_boolean(d.getVar("BB_NO_NETWORK")): |
902 | raise NetworkAccess(url, info) | 902 | raise NetworkAccess(url, info) |
903 | elif not trusted_network(d, url): | 903 | elif not trusted_network(d, url): |
904 | raise UntrustedUrl(url, info) | 904 | raise UntrustedUrl(url, info) |
@@ -1098,7 +1098,7 @@ def trusted_network(d, url): | |||
1098 | BB_ALLOWED_NETWORKS is set globally or for a specific recipe. | 1098 | BB_ALLOWED_NETWORKS is set globally or for a specific recipe. |
1099 | Note: modifies SRC_URI & mirrors. | 1099 | Note: modifies SRC_URI & mirrors. |
1100 | """ | 1100 | """ |
1101 | if d.getVar('BB_NO_NETWORK') == "1": | 1101 | if bb.utils.to_boolean(d.getVar("BB_NO_NETWORK")): |
1102 | return True | 1102 | return True |
1103 | 1103 | ||
1104 | pkgname = d.expand(d.getVar('PN', False)) | 1104 | pkgname = d.expand(d.getVar('PN', False)) |