fix(updates): read dnf's security advisories from the cached metadata (#76) #77

Merged
christianmanivong merged 1 commits from fix/dnf-security-cache-only into main 2026-11-02 07:18:34 +00:00
Owner

DNF_SECURITY_COMMAND now runs dnf --cacheonly updateinfo list --security. Without --cacheonly, dnf downloads the repositories' metadata whenever its cache has expired, and on an Oracle Linux host on OCI that took longer than netOrk's whole 120 s poll. Refreshing the index stays its own step (dnf makecache, which netOrk runs daily). Without a cache dnf fails at once, which the __DNF_RC marker already turns into "security unknown".

Test: a stand-in dnf records its arguments, and --cacheonly must be among them.

Merge this first: NAPALM/napalm-linux's PR for #59 installs device-types from main in CI, and its dnf test needs this change.

Closes #76

`DNF_SECURITY_COMMAND` now runs `dnf --cacheonly updateinfo list --security`. Without `--cacheonly`, dnf downloads the repositories' metadata whenever its cache has expired, and on an Oracle Linux host on OCI that took longer than netOrk's whole 120 s poll. Refreshing the index stays its own step (`dnf makecache`, which netOrk runs daily). Without a cache dnf fails at once, which the `__DNF_RC` marker already turns into "security unknown". Test: a stand-in `dnf` records its arguments, and `--cacheonly` must be among them. Merge this first: NAPALM/napalm-linux's PR for #59 installs device-types from `main` in CI, and its dnf test needs this change. Closes #76
christianmanivong added 1 commit 2026-11-02 07:08:06 +00:00
fix(updates): read dnf's security advisories from the cached metadata
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 55s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Successful in 32s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / build (pull_request) Successful in 25s
driver / security (pull_request) Successful in 57s
CI / driver (pull_request) Successful in 2m27s
driver / publish (pull_request) Skipped
f337ae7fb8
DNF_SECURITY_COMMAND ran `dnf updateinfo list --security`, which downloads
the repositories' metadata first whenever the cached copy has expired. On an
Oracle Linux host on OCI that took longer than netOrk's whole 120 s poll.
It now runs with --cacheonly, as APT_UPGRADABLE_COMMAND reads apt's local
index; refreshing stays `dnf makecache`. Without a cache dnf fails at once,
and the __DNF_RC marker already turns that into "security unknown".

Closes #76
christianmanivong merged commit 935fad2a2d into main 2026-11-02 07:18:34 +00:00
christianmanivong deleted branch fix/dnf-security-cache-only 2026-11-02 07:18:34 +00:00
Sign in to join this conversation.