Skip to content

fix(ci): Install the system requirements of the packages being checked - #2853

Merged
krlmlr merged 1 commit into
mainfrom
claude/revdep2-member-sysreqs-8mj8p1
Aug 17, 2026
Merged

fix(ci): Install the system requirements of the packages being checked#2853
krlmlr merged 1 commit into
mainfrom
claude/revdep2-member-sysreqs-8mj8p1

Conversation

@krlmlr

@krlmlr krlmlr commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Libra fails both halves of its check with

LBLasso.c:8:10: fatal error: gsl/gsl_vector.h: No such file or directory

and the report records it under "failed to check — installation failed". It is not a Libra problem: nothing ever installed libgsl-dev on the runner.

Why nothing did

install_closure() returns each revdep's dependencies, never the revdep itself, so the package under test is never in the shard's library. R CMD check builds it from its tarball. Neither of the two things that resolve system requirements can see it:

  • PKG_SYSREQS covers what pak installs — and pak never installs Libra.
  • sysreqs_fix_installed(library =) covers what is on disk — and Libra is not.

Libra declares SystemRequirements: gsl, and pak::pkg_sysreqs("Libra") resolves it to libgsl0-dev without difficulty. Nobody asked.

The change

ensure_check_sysreqs(members), called from the shard after the installs and before the first check, alongside the existing library survey.

Only what is missing gets installed. sysreqs_list_system_packages() says what is already there, including what other packages provide — a virtual package satisfies a dependency as a real one does — so a shard whose requirements the image already carries runs no apt at all.

apt directly rather than through pak, because sysreqs_fix_installed() reads the library and these packages are not in it. A failure is reported and not fatal: the check will fail either way, and it will say why more clearly than this can.

Verified on a runner without gsl

Test: 1 of 1 system requirement(s) of the packages to check are missing: libgsl0-dev
...
Setting up libgsl-dev (2.7.1+dfsg-6ubuntu2) ...
Test: installed 1 system package(s) for the packages to check

A second call is a no-op — all 1 system requirement(s) of the 1 package(s) to check are present. A package with no unmet requirements installs nothing. An empty member list returns without resolving anything.

Note apt resolved libgsl0-dev to libgsl-dev; the mapping pak returns and the package apt installs need not be the same name, which is why the check is setdiff against installed-plus-provided rather than an equality test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01D1xpHRV7yVfgtJg4vp9P7z


Generated by Claude Code

Libra fails both halves of its check with

```
LBLasso.c:8:10: fatal error: gsl/gsl_vector.h: No such file or directory
```

and the report records it as a package that fails to install.
It is not: nothing ever installed `libgsl-dev` on the runner.

`install_closure()` returns each revdep's *dependencies*,
never the revdep itself,
so the package under test is never in the shard's library.
`R CMD check` builds it from its tarball,
and neither of the two things that resolve system requirements sees it:
`PKG_SYSREQS` covers what pak installs,
and `sysreqs_fix_installed()` covers what is on disk.
Libra declares `SystemRequirements: gsl`
and `pak::pkg_sysreqs("Libra")` resolves it without difficulty --
nobody asked.

So the shard asks, for its own members,
after the installs and before the first check.
Only what is missing is installed:
`sysreqs_list_system_packages()` says what is already there,
including what other packages *provide*,
since a virtual package satisfies a dependency as a real one does.
A shard whose requirements the image already carries runs no apt at all.

apt directly rather than through pak,
because `sysreqs_fix_installed()` reads the library
and these packages are not in it.
A failure is reported and not fatal:
the check will fail either way,
and it will say why more clearly than this can.

Verified on a runner without gsl:

```
Test: 1 of 1 system requirement(s) of the packages to check are missing: libgsl0-dev
...
Test: installed 1 system package(s) for the packages to check
```

and a second call is a no-op --
`all 1 system requirement(s) of the 1 package(s) to check are present`.
A package with no unmet requirements installs nothing;
an empty member list returns without resolving anything.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D1xpHRV7yVfgtJg4vp9P7z
@krlmlr
krlmlr merged commit 98e611a into main Aug 17, 2026
6 checks passed
@krlmlr
krlmlr deleted the claude/revdep2-member-sysreqs-8mj8p1 branch August 17, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants