handle recipes with BB_GIT_SHALLOW (clone) enabled
(see from https://git.ostc-eu.org/oss-compliance/pipelines/-/issues/11#note_67770 onwards)
If BB_GIT_SHALLOW
is enabled for a recipe with a git upstream source (eg. recent versions of binutils
recipe), one cannot find the (unpacked) git bare clone repo in DL_DIR
, but at most (and just if BB_GENERATE_MIRROR_TARBALLS
is set) the packed (.tar.gz
) archive of the shallow clone, named with the following scheme:
gitshallow_<git url with no url scheme and slashes replaced by dots>_<first 7 chars of git commit sha1>-1_<branch name as set in SRC_URI "branch" parameter>.tar.gz
example:
if SRC_URI
contains
git://sourceware.org/git/binutils-gdb.git;branch=binutils-2_38-branch;protocol=git
and SRCREV
is 134f17ef688ba4c72a6c4e57af7382882cc1a705
, the shallow clone tarball can be found in DL_DIR
with name:
gitshallow_sourceware.org.git.binutils-gdb.git_134f17e-1_binutils-2_38-branch.tar.gz
Both tinfoilhat and aliensrc_creator should be improved to handle also such cases
Edited by Alberto Pianon