fix(testing): don't wipe /var/cache/apt entirely on ALT Linux images - #136
Merged
Merged
Conversation
ALT's apt-get (apt-rpm) keeps its package lists under /var/cache/apt itself, unlike Debian/Ubuntu's apt which keeps lists in /var/lib/apt/lists and only caches downloaded archives under /var/cache/apt. The final 'rm -rf /var/cache/apt' cleanup step deleted that state, so every 'apt-get update' run against containers built from this image failed immediately. Only clear the archive cache instead, matching the pattern already used by every Debian/Ubuntu testing Dockerfile in this repo.
twangboy
added a commit
that referenced
this pull request
Sep 3, 2026
…mages The previous fix (#136) narrowed the final cache cleanup from 'rm -rf /var/cache/apt' to 'rm -rf /var/cache/apt/archives/*', but that glob also removes the archives/partial subdirectory itself. ALT's apt-get (apt-rpm) doesn't recreate it on its own, so every apt-get update run against containers built from this image still failed: E: Archive directory /var/cache/apt/archives/partial is missing. E: Unable to lock the list directory Recreate the empty directory after cleaning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The final cleanup step in
custom/testing/altlinux-10.Dockerfileandcustom/testing/altlinux-11.Dockerfileruns:```
apt-get clean
rm -rf /var/cache/apt
```
Unlike Debian/Ubuntu's apt, which keeps its package lists in
/var/lib/apt/listsand only caches downloaded archives under/var/cache/apt, ALT Linux'sapt-get(apt-rpm) keeps its package lists under/var/cache/aptitself. Wiping the whole tree removes that state, so anyapt-get updaterun in a container started from this image fails immediately (no network attempt, just a local error).This was breaking
salt-bootstrapCI for ALT Linux (see saltstack/salt-bootstrap#2125), whereinstall_alt_linux_onedir_deps()'sapt-get updatefailed right away with no useful error in the trace.Fix: only clear the archive cache (
rm -rf /var/cache/apt/archives/*), matching the pattern every Debian/Ubuntu testing Dockerfile in this repo already uses.What issues does this PR fix or reference?
Unblocks saltstack/salt-bootstrap#2125.