[bitbake-devel] [PATCH v2 2/2] gitsm.py: support BB_NO_NETWORK during do_unpack

Mark Hatle mark.hatle at windriver.com
Wed Sep 6 15:53:04 UTC 2017


On 9/6/17 10:47 AM, Mikko.Rapeli at bmw.de wrote:
> On Wed, Sep 06, 2017 at 08:24:14AM -0700, Christopher Larson wrote:
>> On Wed, Sep 6, 2017 at 5:33 AM, Mikko Rapeli <mikko.rapeli at bmw.de> wrote:
>>
>>> 'git submodule update --init -recursive' will clone remote repositories
>>> if local tree does not have the referenced commits. Add --no-fetch
>>> to git submodule update if BB_NO_NETWORK is defined and only local
>>> download caches should be used.
>>>
>>> Signed-off-by: Mikko Rapeli <mikko.rapeli at bmw.de>
>>>
>>
>> If we’re unpacking, there’s no reason to be contacting anything remote
>> regardless of the value of BB_NO_NETWORK. We should be passing —no-fetch
>> all the time. We also need to be running a submodule sync to update any
>> changes urls in the submodule remotes, but there are other issues to be
>> resolved beyond that.
> 
> Yes, I thought about this but decided not to change current behavior.
> Should have mentioned that in the commit message.
> 
> I can send a new version where --no-fetch is the default but it might break
> in some setups, especially when the DL_DIR cache is not used for submodules...

(without truely understanding the ramifications), I would prefer the system to
fail with an error then attempt to contact a network resources if BB_NO_NETWORK
is set.

An error (with a resolution of somehow getting the item local either in the
DL_DIR or a file:// mirror seems like the best alternative for a user who needs
to prevent network access.

So if --no-fetch will help ensure that, I'm all for it.

--Mark

> -Mikko
> 




More information about the bitbake-devel mailing list