[bitbake-devel] gitsm fetcher does not work anymore

Mark Hatle mark.hatle at windriver.com
Tue Oct 2 17:34:07 UTC 2018


On 10/2/18 12:14 PM, Mark Hatle wrote:
> On 10/2/18 11:24 AM, Florian Wickert wrote:
>> Hi all,
>>
>> relative URL schemes (e.g. submodules in 
>> https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 
>> git at github.com:user/example.git) are not parsed correctly since the 
> 
> git at github.com:user/example.git that is not a valid URL.
> 
> ssh://git@github.com/user/example.git would be.
> 
> Is this an issue where it's specified inside of the git repository as a non-url
> string?  If so, we'll have to learn how to recognize that and convert it
> 'somehow' to something that can be recognized as a URL.
> 
> (Does the git fetcher support ssh uris?)

FYI, the code that makes this work (for URIs) is:

http://git.openembedded.org/bitbake/tree/lib/bb/fetch2/gitsm.py

Lines 76+

            # Build new SRC_URI
            proto = uris[module].split(':', 1)[0]
            url = uris[module].replace('%s:' % proto, 'gitsm:', 1)
            url += ';protocol=%s' % proto

It splits at the :, since a proper URL should be <proto>://<path>  The it makes
the new URL into gitsm://<path>;protocol=<proto>

If if supporting the non-URI format of an SSH git is needed, then something will
need to be specifically added to this section to recognize and convert the URL
to a URL formatted configuration.

--Mark

> --Mark
> 
>> rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
>> The SSH scheme is required for private repos on github because https 
>> doesn't work with SSH keys.
>>
>> Regards,
>> Florian
>>
> 




More information about the bitbake-devel mailing list