[yocto] SRC_URI issue in recipe writing

Pourya Shirazian pourya.shirazian at gmail.com
Tue Jun 24 12:22:51 PDT 2014


Thanks alot Anders,

Finally I made it work with ssh:

The colon after the domain name should be changed to a / :
Wrong) SRC_URI = "git at mygitserver.net:me/myproject.git;protocol=ssh;
branch=master"
Correct) SRC_URI = "git at mygitserver.net/me/myproject.git;protocol=ssh;
branch=master"

Cheers,


On Tue, Jun 24, 2014 at 1:27 AM, Anders Darander <anders at chargestorm.se>
wrote:

> * Pourya Shirazian <pourya.shirazian at gmail.com> [140624 00:58]:
>
> > Hi,
>
> > When writing a recipe the SRC_URI is supposed to accept git repository
> > addresses but the following fails to build for me:
>
> > 1. With http URL: It also does not allow my credentials to be embedded
> in the
> > URI
>
> > SRC_URI = "
> http://mygitserver.net/myproject.git;protocol=http;branch=master"
>
> You should use git:// here. This is to inform bitbake that this is a git
> URL. You should keep protocol=http, as this will tell bitbake that git
> should use the http protocol.
>
> Do you need to supply credentials together with your http-URL?
>
> > Exception: ExpansionError: Failure expanding variable SRCPV, expression
> was $
> > {@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher
> > failure: SRCREV was used yet no valid SCM was found in SRC_URI
>
> Well, as you used http://... in SRC_URI, bitbake think's it has to
> download a file from the webserver.
>
>
> > 2. With ssh URL
>
> > SRC_URI = "git at mygitserver.net:
> me/myproject.git;protocol=ssh;branch=master"
>
> > Exception: ExpansionError: Failure expanding variable SRCPV, expression
> was $
> > {@bb.fetch2.get_srcrev(d)} which triggered exception MalformedUrl: The
> URL: "
> > git at mygitserver.net:me/myproject.git;protocol=ssh;branch=master" is
> invalid and
> > cannot be interpreted
>
> You still need to start the URI with git://...
>
> > After checking the documentation it seems it only expects the git
> protocol only
> > and it worked in this example, however, our internal enterprise github
> only
> > supports http and ssh URIs.
>
> No, the protocol is specified by adding protocol=xxx.
>
> > SRC_URI = "git://
> github.com/GraphicsEmpire/gridvisualization.git;branch=master”
>
> Cheers,
> Anders
>
> --
> Anders Darander
> ChargeStorm AB / eStorm AB
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20140624/b3fd5b5b/attachment.html>


More information about the yocto mailing list