[bitbake-devel] Bitbake and Git LFS

Florian Doersch florian.doersch at iis.fraunhofer.de
Fri Jun 9 10:33:43 UTC 2017


Hi,

I am currently using Bitbake via Yocto.

Since we use git lfs to store larger binary blobs in our git 
repositories, I ran into a problem building these repositories in bitbake.

I did some research and finally found a solution. I had to run "git lfs 
fetch --all" after "git clone --mirror", so an addition clone from the 
mirror has all necessary lfs objects available.

I've created a small patch (without any checks if git lfs is available 
or used, so theres still work to do)

--- poky/bitbake/lib/bb/fetch2/git.py.orig	2017-06-09 09:33:24.044338249 
+0200
+++ poky/bitbake/lib/bb/fetch2/git.py	2017-06-09 10:11:13.000000000 +0200
@@ -201,6 +201,7 @@
              if ud.proto.lower() != 'file':
                  bb.fetch2.check_network_access(d, clone_cmd)
              runfetchcmd(clone_cmd, d)
+            runfetchcmd("git -C %s lfs fetch --all" % ud.clonedir, d)

          os.chdir(ud.clonedir)
          # Update the checkout if needed

You can freely use it if helpful.

Is there already an "official solution for that kind of problem?

Best Regards
Florian



More information about the bitbake-devel mailing list