[bitbake-devel] gitsm: orphaned submodules WAS: Sumo to Thud migration: Fetch failure from gitsm.py

Mark Hatle mark.hatle at windriver.com
Mon Dec 17 17:25:52 UTC 2018


On 12/14/18 6:37 AM, raphael.lisicki at siemens.com wrote:
> Hello,
> 
> as Josias has already pointed out, the new gitsm fetcher fails if there is a submodule entry in .gitmodules, for which no actual submodule exists.
> 
> I created a dummy module that shows the respective issue: https://github.com/ralisi/submodule-test
> 
> This repository is shown correctly by github and cloning it with git causes no problem. I think it should be possible to fetch this repository with the gitsm module.
> To do so, I think the loop iteration at http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/fetch2/gitsm.py#n87 can be skipped if module_hash is indeed an empty string.

So to be clear, you are proposing that is the response is blank, then we simply
run a 'continue', avoiding any setup/download for this item as there is no
specific hash to download?

That would be easy enough to implement, likely:

            try:
                module_hash = runfetchcmd("%s ls-tree -z -d %s %s" %
(ud.basecmd, ud.revisions[name], paths[module]), d, quiet=True, workdir=ud.clonedir)
            except ???:
                module_hash = None

            if not module_hash:
                continue

            module_hash = module_hash.split()[2]


(Not sure if the try/except is needed.. if it is, not sure which exception to
capture here..)

--Mark

> 
> Best regards
> Raphael Lisicki
> 



More information about the bitbake-devel mailing list