[yocto] Git and http problem.
Paul Eggleton
paul.eggleton at linux.intel.com
Mon Apr 13 05:43:04 PDT 2015
Hi Francois,
On Monday 13 April 2015 11:53:25 Francois P. Gallichand wrote:
> I'm working behind a firewall, on which I have absolutely no control, and it
> does not allows the git protocol to go through. So I patch the recipes to
> replace the git protocol by the http protocol and it works most of the
> time. However one specific package, linux-yocto, does not seem to work even
> If I use the http protocol. It either times-out during the fetch, of the
> fetch goes on forever.
Assuming there's no infrastructure issue on our end, it sounds a bit like your
firewall might be proxying the http fetch completely, and the fetch takes
longer than the configured timeout.
You could set up a local mirror to work around this and set up the system to
point to it using PREMIRRORS. Note that you can also use PREMIRRORS to
effectively add ;protocol=http to git URIs as well, you shouldn't need to patch
each recipe.
> Frustrated with that situation, I tried various things to realize that if I
> tried to manually clone the git repository, it doesn't work with a "git
> clone git://...;protocol=http;..." but if I use "git clone
> http://...;protocol=http; ...",it is working fine. But the http:// form is
> not supported by bitbake as if I use it in a recipe as the SRC_URI, bitbake
> gives me an error.
>
> Is it a bug with bitbake or am I doing something wrong?
It's not a bug - git and bitbake's fetcher expect different URI formats -
bitbake has support for multiple fetch types and therefore needs a hint to
tell it which fetcher module should handle the URI and that's the prefix, so
anything that should be fetched by the git fetcher module needs to be prefixed
with git:// even if the actual protocol ends up being http (in which case it
would be git://...;protocol=http). If you are then going back to git on the
command line you'd need to translate that back into http://.. form (note that
protocol= is something our git fetcher understands; git itself does not so you
would not specify that on the git command line).
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list