]> git.ipfire.org Git - thirdparty/qemu.git/commit
gitlab: purge msys pacman cache
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 10 Oct 2025 16:05:45 +0000 (17:05 +0100)
committerThomas Huth <thuth@redhat.com>
Thu, 16 Oct 2025 15:44:31 +0000 (17:44 +0200)
commit1d7fdee97b8959871d4093d89a79192155ca674f
tree7e1c9ea42f06f6695310fdf9f30dc0aae2c3b1cc
parentdadd7419d361f8f9f012cbc1413993132cd55b7a
gitlab: purge msys pacman cache

For the Windows msys2 CI job we install many packages using pacman
and use the GitLab cache to preserve the pacman cache across CI
runs. While metadata still needs downloading, this avoids pacman
re-downloading packages from msys2 if they have not changed.

The problem is that pacman never automatically purges anything
from its package cache. Thus the GitLab cache is growing without
bound and packing/unpacking the cache is consuming an increasing
amount of time in the CI job.

If we run 'pacman -Sc' /after/ installing our desired package set,
it will purge any cached downloaded packages that are not matching
any installed package.

This will (currently) cap the pacman download cache at approx
256 MB.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20251010160545.144760-1-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
.gitlab-ci.d/windows.yml