bitbake provided path does not contain path to git so fetch is stalled
Hello,
I decided to give yocto scarthgap a spin at home with Ubuntu 24.02 (somehow it works at the same Ubuntu version at work computer, but cannot investigate at weekend, why it works there), first I had to add apparmor profile (due to ubuntu apparmor protection), as recommended in https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2056555 ) then building an sample image started,
but encountered strange behavior:
git fetch would stuck.
So I added -DDD option and observed, that git fetch is invoked with exported path, which does not contain path to git, if I ran git command in a separate console without bitbake provided path then git fetches sources (so git works), but if exported path is added as git fetcher does via bitbake I observe the same a command just hangs.
My question is, how to enable so that bitbake invoked git also has regular path environmental variable being attached?
Best regards
Sergey
Hello,
to fix described problem of stalled fetch with bitbake on Ubuntu 24.02 I made a dirty fix in code
git.py
- ud.basecmd = d.getVar("FETCHCMD_git") or "git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all"
+ ud.basecmd = d.getVar("FETCHCMD_git") or "/usr/bin/git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all"
so I just invoke git with full path, and bitbake now fetches sources, so indeed, the problem is about missing path in "export PATH=" when bitbake works on image
Regards
Sergey
Hello,
so seems I found a solution: completely delete poky build directory and start anew.
somehow it works now. It looks like an attempt to use bitbake without apparmor profile in Ubuntu makes some changes in cache which prevents later proper functioning of bitbake. so the correct way to proceed is not to try bitbake without apparmor profile, and if there are problems after the try - just start from clean yocto, when apparmor profile is in place
Regards
Sergey