jjb: Clone linux kernel with `--reference-if-able`
authorKienan Stewart <kstewart@efficios.com>
Mon, 18 Mar 2024 19:21:51 +0000 (15:21 -0400)
committerKienan Stewart <kstewart@efficios.com>
Mon, 18 Mar 2024 19:36:29 +0000 (15:36 -0400)
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>
jobs/lttng-modules.yaml
scripts/lttng-modules/param-build.sh

index bc60dfacf8e6d216ff8a190f4d949f397e740887..b3d5646bbe41eccb636befa93ed59fca2abe9a0e 100644 (file)
 
     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
index 5ee567175d130117c232638bf83abb52ee5b1d2d..42d076739ed5e411b9b5e91e36b486f4c1313513 100644 (file)
@@ -96,7 +96,7 @@ git_clone_modules_sources() {
 # 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"
 }
 
 
This page took 0.024589 seconds and 4 git commands to generate.