diff options
author | Joe MacDonald <joe@deserted.net> | 2013-07-02 09:19:07 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-05 15:26:22 +0100 |
commit | ed585cad2e1fdc323c05fa82055a071bcf98d1bc (patch) | |
tree | f8373df92c6f718fc1f87001a75ab57c8b2edd38 /meta | |
parent | d56e0c0e315acdb0ba5db7a539970d64678c1f7a (diff) | |
download | openembedded-core-ed585cad2e1fdc323c05fa82055a071bcf98d1bc.tar.gz openembedded-core-ed585cad2e1fdc323c05fa82055a071bcf98d1bc.tar.bz2 openembedded-core-ed585cad2e1fdc323c05fa82055a071bcf98d1bc.zip |
sstate.bbclass: Add an extra check for sstate_mirrors
BB_NO_NETWORK disables any fetching, however if we're using an external
sstate cache, we may want to be able to fetch those objects even if we are
not fetching the upstream sources. Denote this situation by setting
SSTATE_MIRROR_ALLOW_NETWORK in local.conf. When it is found, for sstate
cache fetches, mask off BB_NO_NETWORK for the local function.
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 28dc312808..c1ca54b4ff 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -509,6 +509,11 @@ def pstaging_fetch(sstatefetch, sstatepkg, d): localdata.setVar('DL_DIR', dldir) localdata.setVar('PREMIRRORS', mirrors) + # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, + # we'll want to allow network access for the current set of fetches. + if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1": + localdata.delVar('BB_NO_NETWORK') + # Try a fetch from the sstate mirror, if it fails just return and # we will build the package for srcuri in ['file://{0}'.format(sstatefetch), @@ -619,6 +624,11 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): bb.debug(2, "SState using premirror of: %s" % mirrors) + # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, + # we'll want to allow network access for the current set of fetches. + if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1": + localdata.delVar('BB_NO_NETWORK') + for task in range(len(sq_fn)): if task in ret: continue |