[bitbake-devel] [bitbake][oe-core][RFC PATCH 1/2] fetch2: Add an extra check for sstate_mirrors

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jun 28 17:04:39 UTC 2013


On Fri, 2013-06-28 at 12:00 -0500, Mark Hatle wrote:
> On 6/28/13 11:56 AM, Richard Purdie wrote:
> > On Fri, 2013-06-28 at 11:05 -0400, Joe MacDonald wrote:
> >> 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.
> >>
> >> Signed-off-by: Joe MacDonald <joe.macdonald at windriver.com>
> >> ---
> >>   bitbake/lib/bb/fetch2/__init__.py |   18 +++++++++++++-----
> >>   1 file changed, 13 insertions(+), 5 deletions(-)
> >
> >
> > Bitbake's fetch module knows nothing about sstate right now and I don't
> > see any reason to teach it about it. Why can't you just change
> > BB_NO_NETWORK in sstate.bbclass before we call into the fetcher?
> 
> We considered that, but won't that then change the value potentially for other 
> things that could be running in parallel?  Or is the namespace protection good 
> enough for that?
> 
> I.e. in sstate.bbclass do a d.setVar ... call the fetch .. d.setVar (restore)?

If you look carefully you'll see sstate.bbclass does a
bb.data.createCopy() of the datastore and only changes that before
calling into the fetcher module. The change is only local to that copy
and the copy only lives as long as its referenced so it should all be
fine.

Cheers,

Richard






More information about the bitbake-devel mailing list