mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
On the Fedora, CentOS Stream and Manjaro workspace jobs install-lint
ran `puppeteer browsers install chrome-headless-shell --install-deps`
as root, and puppeteer rejected it with "apt-get does not seem to be
available". The installer only warned ("optional lint tool"), so
install-lint passed while mmdc had no browser.
--install-deps is now passed only where apt-get exists. Everywhere else
the libraries `ldd` reports missing are installed by soname: dnf and
yum through the RPM provide `<soname>()(64bit)`, pacman through the
first package `pacman -F usr/lib/<soname>` names (libgbm.so.1 is owned
by both mesa and mesa-amber, which conflict). browser_installed() also
requires every library to resolve, so the install-lint stamp stays
stale until the browser can actually load.
A failed npm install, a missing mmdc, a failed or timed-out browser
download and unresolved libraries now raise instead of warning.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
utils/install
This directory hosts the Python implementation behind make install-lint.
For the general rules that govern READMEs in code directories see documentation.md.
Purpose
The package installs the lint toolchain (actionlint, shfmt, ruff, ansible-lint, mbake, markdownlint-cli2, eslint, shellcheck, ansible-playbook, ansible-galaxy) using the right channel per tool (system package manager, pip, npm, or GitHub release). Modules at this level are channel-agnostic primitives; per-tool policy lives one level down in lint/.
Structure
| File | Role |
|---|---|
primitives.py |
Logging, sudo wrapping, PATH mutation, and stdlib-based URL download. |
pip.py |
Venv-aware pip installer with --break-system-packages and --user fallback. |
npm.py |
Global / local npm install with per-user --prefix fallback. |
github_release.py |
Latest-tag resolver and asset downloader for GitHub releases. |
system_pkg.py |
Per-manager dispatch for pacman / apt-get / dnf / yum / brew. |
lint/ |
One module per tool, each exposing ensure(). See lint README. |
The CLI entry point lives at __main__.py, invoked from lint.sh as python3 -m utils.install.lint.
The matching dispatcher wrapper.sh routes make install-lint host vs container based on INFINITO_LINT_RUNNER.
File Naming
- Module names MUST stay lowercase snake_case.
- Channel-agnostic helpers MUST live directly under
utils/install/. - Per-tool policy (one tool per file) MUST live under
lint/(see lint README). - Test files live in tests/unit/python/utils/install/ and mirror the module name with a
test_prefix.
Import Rules
primitives.pyMUST NOT import from any other module in this package.pip.py,npm.py,github_release.py, andsystem_pkg.pyMAY import fromprimitives.py.npm.pyMAY import fromsystem_pkg.pyto bootstrap npm itself; no other cross-imports between these four are allowed.- Per-tool modules under
lint/MUST NOT import each other (see lint README).