osmith submitted this change.
jobs/ttcn3-testsuites-testenv: fix rm apt partial
Fix that testenv jobs may fail to remove the cache at the beginning:
rm: cannot remove '_cache/podman/var-lib-apt-debian-trixie/lists/partial': Permission denied
This happens when the partial directory still exists:
$ ls -lah ~/jenkins/workspace/ttcn3-bsc-test-sccplite/_cache/podman/var-lib-apt-debian-trixie/lists
total 12K
drwxr-xr-x 3 osmocom-build osmocom-build 4.0K Apr 27 08:48 .
drwxr-xr-x 3 osmocom-build osmocom-build 4.0K Apr 26 08:48 ..
drwx------ 2 100041 osmocom-build 4.0K Apr 26 08:48 partial
Which in turn is the result of "apt update" failing to download files in
an earlier job:
E: Failed to fetch https://downloads.osmocom.org/packages/osmocom:/nightly/Debian_13/./Packages.gz File has unexpected size (210767 != 210491). Mirror sync in progress? [IP: 148.251.236.141 443]
Hashes of expected file:
- Filesize:210491 [weak]
- SHA256:a0cdea838b724880f455d68eb433f6331a7d4113c2eb677ca2f7f6dbdf9a72e1
- SHA1:71780896257ca550e51b95e77fee4c63fcc9980c [weak]
- MD5Sum:531a2d49d4e9f3ff121ca6aa5be602fc [weak]
Release file created at: Sun, 26 Apr 2026 08:48:04 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
Change-Id: I35b9e42b754805b42f0a868a5d0c20c1f1c01731
---
M jobs/ttcn3-testsuites-testenv.yml
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/jobs/ttcn3-testsuites-testenv.yml b/jobs/ttcn3-testsuites-testenv.yml
index 144377e..944a92c 100644
--- a/jobs/ttcn3-testsuites-testenv.yml
+++ b/jobs/ttcn3-testsuites-testenv.yml
@@ -643,6 +643,19 @@
podman pull registry.osmocom.org/osmocom-build/debian-"$debver"-osmo-ttcn3-testenv
done
+ # Clean up leftover apt partial directories, which the host system
+ # user can't remove directly
+ for i in _cache/podman/var-lib-apt-debian-*/lists/partial; do
+ if [ -e "$i" ]; then
+ podman run \
+ --rm \
+ -v "$PWD:/build" \
+ -w /build \
+ osmocom-build/debian-trixie-osmo-ttcn3-testenv \
+ rm -rvf "$i"
+ fi
+ done
+
rm -rf logs _cache .linux
if [ "$KERNEL" != "none" ]; then
To view, visit change 42710. To unsubscribe, or for help writing mail filters, visit settings.