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

raphael.lisicki at siemens.com raphael.lisicki at siemens.com
Tue Dec 18 14:13:48 UTC 2018


Hello,

> 
> 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/git
> sm.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?

Exactly.

> 
> 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..)

As I have not experienced any throws within runfetchcmd, I don't see the need for a try/catch. Apart from that, this is exactly what I had on my mind.

> 
> --Mark
> 

Best regards
Raphael Lisicki



More information about the bitbake-devel mailing list