aptneed

command
v0.139.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command aptneed installs the apt packages a CI job needs and refuses to call a mirror outage a missing package — or a successful install a present binary.

⛔⛔ A THIRD PARTY'S MIRROR MUST NOT BLOCK A RELEASE. Measured in go-pdfkit/ops on 2026-11-11 (issue #90): the step

sudo apt-get update && sudo apt-get install -y --no-install-recommends poppler-utils

failed FOUR times in half an hour on one merge commit, every time with

E: Failed to fetch mirror+file:/etc/apt/apt-mirrors.txt/pool/main/p/poppler/…
   Temporary failure resolving 'azure.archive.ubuntu.com'

The pull request had been green on the same workflow minutes earlier. Nothing about the repository had changed; the runner's MIRRORLIST had. `ghrelease` will not tag while main is red — correctly — so an unreachable mirror held a tagged release hostage, and the job had no way to say which of the two it was.

⛔ EVERY `apt-get` ON A GITHUB RUNNER GOES THROUGH THAT MIRRORLIST. /etc/apt/apt-mirrors.txt names a cloud-local mirror, and every source in /etc/apt/sources.list.d resolves through it with `mirror+file:`. When the name does not resolve, pointing at archive.ubuntu.com "instead" changes nothing: the sources still read the mirrorlist. So the fallback here rewrites THE MIRRORLIST, which is the one file every source agrees to obey.

⛔ A PACKAGE THAT DOES NOT EXIST IS NOT RETRIED — WHEN APT COULD CHECK. "Unable to locate package" means the name is wrong, and waiting twenty seconds to ask again dresses a typo up as an outage. The two failures get different exit messages because they want different people.

⛔ BUT THOSE WORDS ARE ALSO WHAT A RUN WITH NO PACKAGE LISTS SAYS, about a name it never checked against anything. So when `apt-get update` FAILED, the same sentence is evidence of nothing, and this retries and says so rather than call a name wrong on the strength of a lookup that did not happen. It does not rewrite the runner's mirrorlist on that evidence until it has seen it twice: see install() and the switch in aptneed().

⛔ AND APT SAYING YES IS NOT THE BINARY BEING THERE. --need names what must end up on PATH; a package renamed upstream installs cleanly and leaves the job without its judge, which is how a test suite comes to skip the thing it was measuring. The check is the point, so --need is required.

aptneed --need pdftoppm poppler-utils
aptneed --need convert --need identify imagemagick

Exit status: 0 the binaries are there, 1 they are not and why, 2 the arguments could not be read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL