feat(apt): read the release each source names, move a file to the host's (NetOrk/netork#2614)
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 15s
driver / types (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 1m7s
driver / test (3.12) (pull_request) Successful in 1m16s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m28s
driver / publish (pull_request) Skipped
driver / lint (pull_request) Successful in 12s
driver / standard (pull_request) Successful in 15s
driver / types (pull_request) Successful in 55s
driver / test (3.13) (pull_request) Successful in 1m7s
driver / test (3.12) (pull_request) Successful in 1m16s
driver / lowest (pull_request) Successful in 38s
driver / build (pull_request) Successful in 30s
driver / security (pull_request) Successful in 1m6s
CI / driver (pull_request) Successful in 2m28s
driver / publish (pull_request) Skipped
A release upgrade leaves third-party apt sources on the old release, where they still answer and their packages stop getting updates once the vendor stops building for it: z2m-house, Ubuntu 24.04, kept Docker's source on focal and never saw a Docker newer than 28.1.1. AptReleaseMixin.get_apt_source_releases() reports the host's /etc/os-release and every enabled source apt reads, one-line and deb822, with its file, line, types, URI, suites and components. set_apt_source_release(path, release, codename) moves every suite of release in one of apt's source files to codename, once each new suite's InRelease or Release is fetched with apt-helper through apt's own proxy; where the vendor has none, nothing is written. AptProxyMixin brings it, so every apt driver has it.
This commit is contained in:
1 parent
2dea517e89
commit
f654076560
7 files changed
+919
-1
No files matched your search
@@ -175,6 +175,15 @@ wins (`get_package_proxy`, `get_package_proxy_report` with every line that sets
|
||||
different proxy, reads the result back and fetches one http source's `InRelease` through it.
|
||||
A driver supplies `_run_apt_command`, `_run_apt_root_command` and `_write_apt_file`.
|
||||
|
||||
`AptReleaseMixin` (`napalm_device_types.apt_releases`) comes with it: every source apt reads,
|
||||
with its file, line, URI and suites, and the host's release from `/etc/os-release`
|
||||
(`get_apt_source_releases`). A release upgrade leaves third-party sources on the old release,
|
||||
where they stop getting updates once the vendor stops building for it; whether a suite names
|
||||
another release than the host's is the caller's to judge (`suite_release` gives the word).
|
||||
`set_apt_source_release(path, release, codename)` moves every suite of *release* in one
|
||||
source file to *codename*, after fetching each new suite's `InRelease` with apt's downloader:
|
||||
where the vendor has none, the file stays as it is.
|
||||
|
||||
`HostStatusMixin` (`get_host_status`) is mixed in the same way: whether a Linux host needs
|
||||
a reboot to finish an update (`/var/run/reboot-required`, `needs-restarting -r`, or a newer
|
||||
kernel of the running flavour installed), whether it patches itself (unattended-upgrades,
|
||||
|
||||
Reference in new issue
Block a user