ci: run apt-get update before installing Linux packages - #41854
Merged
Merged
Conversation
Every acceptance job was failing on the "Install Linux packages" step, and
re-running did not help:
E: Failed to fetch .../g/ghostscript/libgs-common_10.02.1~dfsg1-0ubuntu7.8_all.deb
404 Not Found [IP: 52.147.219.192 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The step installed straight from the package index baked into the runner image.
That index is stale, so the exact .deb versions it names have already been
superseded on the Azure mirror and the URLs 404. A ghostscript security update -
imagemagick pulls ghostscript in - is enough to break every job, with no change
on our side. See actions/runner-images#7452.
So run apt-get update immediately before each install. "Install Apache" already
did; "Install Linux packages" and the libxml2-utils step did not.
Also:
- add -o Acquire::Retries=3 to the installs, so one flaky mirror hit retries
instead of taking a whole matrix job down with it;
- use apt-get rather than apt for libxml2-utils - apt has no stable CLI for
scripts and says so on every run.
Seen on https://github.com/owncloud/core/actions/runs/35783629819/job/107115884062
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
phil-davis
approved these changes
Sep 23, 2026
Contributor
|
Note: 10.16 has no |
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.
Description
Every
API Smoke Tests / Acceptance testsjob was failing on the Install Linux packages step, andre-running did not help — run 35783629819, job 107115884062:
The step installed straight from the package index baked into the runner image
(
ubuntu24/20260907.300). That index is stale, so the exact.debversions it names have alreadybeen superseded on the Azure mirror and the URLs 404.
imagemagick— the one value any caller passesfor
additional-packages— pulls in ghostscript, so a ghostscript security update is enough to takedown every acceptance job with no change on our side. This is the long-standing runner-images problem
in actions/runner-images#7452, and its documented workaround is to always
apt-get updatefirst.Changes
apt-get updateimmediately before each install.Install Apachealready did this;Install Linux packagesand the libxml2-utils step did not.-o Acquire::Retries=3on the installs, so one flaky mirror hit retries rather than taking a wholematrix job down with it.
apt-getinstead ofaptfor libxml2-utils —apthas no stable CLI for scripts and prints awarning saying so on every run.
Only
.github/workflows/acceptance.ymlis touched.php-unit.ymlandjs-unit.ymlalready updatebefore installing. The
10.16branch has noacceptance.yml, and its only apt call(
php-unit.yml) already updates, so there is nothing to backport.Related
Unblocks #41827, which was red purely on this and does not touch
.github/at all.How to test
CI is the test — the acceptance jobs on this PR run the same
ci.yml→acceptance.ymlpath withadditional-packages: 'imagemagick'. TheInstall Linux packagesstep should now showapt-get updatefetching indexes followed by a cleanSetting up ghostscript/Setting up imagemagick, with no404 Not Found.🤖 Generated with Claude Code