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:34:26 +0100 |
commit | 4d326e5edf6fa8238cb4043db038ad114b1b96ce (patch) | |
tree | 21e5ceb827dc659ee03692f70bb041f6e80e4bdd /meta | |
parent | 34e5f5d21f8fd2619210b077ff19bc939db0f440 (diff) | |
download | poky-4d326e5edf6fa8238cb4043db038ad114b1b96ce.tar.gz |
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.
(From OE-Core rev: ed585cad2e1fdc323c05fa82055a071bcf98d1bc)
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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): | |||
509 | localdata.setVar('DL_DIR', dldir) | 509 | localdata.setVar('DL_DIR', dldir) |
510 | localdata.setVar('PREMIRRORS', mirrors) | 510 | localdata.setVar('PREMIRRORS', mirrors) |
511 | 511 | ||
512 | # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, | ||
513 | # we'll want to allow network access for the current set of fetches. | ||
514 | if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1": | ||
515 | localdata.delVar('BB_NO_NETWORK') | ||
516 | |||
512 | # Try a fetch from the sstate mirror, if it fails just return and | 517 | # Try a fetch from the sstate mirror, if it fails just return and |
513 | # we will build the package | 518 | # we will build the package |
514 | for srcuri in ['file://{0}'.format(sstatefetch), | 519 | for srcuri in ['file://{0}'.format(sstatefetch), |
@@ -619,6 +624,11 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | |||
619 | 624 | ||
620 | bb.debug(2, "SState using premirror of: %s" % mirrors) | 625 | bb.debug(2, "SState using premirror of: %s" % mirrors) |
621 | 626 | ||
627 | # if BB_NO_NETWORK is set but we also have SSTATE_MIRROR_ALLOW_NETWORK, | ||
628 | # we'll want to allow network access for the current set of fetches. | ||
629 | if localdata.getVar('BB_NO_NETWORK', True) == "1" and localdata.getVar('SSTATE_MIRROR_ALLOW_NETWORK', True) == "1": | ||
630 | localdata.delVar('BB_NO_NETWORK') | ||
631 | |||
622 | for task in range(len(sq_fn)): | 632 | for task in range(len(sq_fn)): |
623 | if task in ret: | 633 | if task in ret: |
624 | continue | 634 | continue |