lttng-modules_PARAM_crossbuild jobs for riscv64 were intermittently
failing when cloning `linux-all.git` with messages similar to the
following:
```
11:53:56 + git clone --depth=1 -b v4.10.17 --reference /home/jenkins/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/git/linux-all.git /home/jenkins/workspace/lttng-modules_PARAM_crossbuild/cross_arch/riscv64/platforms/deb12-amd64/src/linux
11:53:56 Cloning into '/home/jenkins/workspace/lttng-modules_PARAM_crossbuild/cross_arch/riscv64/platforms/deb12-amd64/src/linux'...
11:53:56 remote: fatal: packfile ./objects/pack/.tmp-479230-pack-
f8bc46fc38bfd97fc2a516d9816a64fccfbfd3b2.pack cannot be accessed
11:53:56 remote: aborting due to possible repository corruption on the remote side.
11:53:56 fatal: early EOF
11:53:56 fatal: fetch-pack: invalid index-pack output
```
Testing using `--reference-if-able` instead of `--reference` seems to
resolve the cloning issue.
Change-Id: I49a03190604c00095436f3098dd8ac95706094e0
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
builders:
- shell: |
- git clone --depth=1 -b v6.1 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
+ git clone --depth=1 -b v6.1 --reference-if-able $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
cd src/linux
make allyesconfig
sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config
# Checkout a shallow kernel tree of the specified tag
git_clone_linux_sources() {
mkdir -p "$LINUX_GIT_DIR"
- git clone --depth=1 -b "${ktag}" --reference "$LINUX_GIT_REF_REPO_DIR" "${kgitrepo}" "$LINUX_GIT_DIR"
+ git clone --depth=1 -b "${ktag}" --reference-if-able "$LINUX_GIT_REF_REPO_DIR" "${kgitrepo}" "$LINUX_GIT_DIR"
}