[bitbake-devel] Git shallow copy problem

Valek, Andrej andrej.valek at siemens.com
Tue Nov 19 13:21:42 UTC 2019


Hello Everyone!

We have made one problem during experimenting with shallow copy tarballs.
Looks like, that the revision inside the archive is not the right one... .

| ERROR: kern-tools-native-0.2+gitAUTOINC+bb6df0ef23-r12 do_unpack: Unpack failure for URL: 'git://git.yoctoproject.org/yocto-kernel-tools.git'. No up to date source found: clone directory not available or not up to date: /home/projects/downloads/git2/git.yoctoproject.org.yocto-kernel-tools.git; shallow clone not available: /home/projects/downloads/gitshallow_git.yoctoproject.org.yocto-kernel-tools.git_bb6df0e-1_master.tar.gz
	- Naming looks also fine. "git_bb6df0e" is matching with our revision, which we are trying to use bb6df0ef2365689cd3df6f76a8838cddae0d9343. 
	- A packed-refs is also fine. "bb6df0ef2365689cd3df6f76a8838cddae0d9343 refs/remotes/origin/master"
So what's wrong there?

So we have removed downloads/archives completely via "bitbake kern-tools-native -c cleanall" and rm -rf "*git.yoctoproject.org.yocto-kernel-tools*" inside downloads and git2 directories.
After these steps, compilation was successful.
So we have checked the revision inside the archive and it's different as we expected. packed-refs: "09afff364c48f84249094ec8d9a171fc332c17e4 refs/remotes/origin/master". Why was the wrong revision been taken?
We reproduced the steps manually.
	- git clone git://git.yoctoproject.org/yocto-kernel-tools.git
	- cd yocto-kernel-tools
	- git-make-shallow -s -r refs/remotes/origin/master bb6df0ef2365689cd3df6f76a8838cddae0d9343
	 - From the bitbake's class looks like, that bitbake is searching for revision (bb6df0ef2365689cd3df6f76a8838cddae0d9343) inside the cloned repository. It finds the revision and removes the rest. After that just packs the content. But we think, that is wrong. Should be some "git checkout" to switch for certain revision before packing? Because it just check, "fine, revision is inside, pack the current HEAD".
Bitbake fetcher just downloads this archive and checks the content. There is only one revision, which is not matching with the expected and will fail.

Correct as please, if we are wrong. But we think, there is a problem with switching to certain revision before shallow tarballs creating.

Thank you,
Andrej & Lubomir


More information about the bitbake-devel mailing list