repoman.checker#
Availability checker: tests repos against a target Ubuntu codename.
Runs entirely in a background thread. Never touches GTK widgets. Uses Launchpad API for PPAs and HTTP HEAD for all other repos. A single network failure sets a global flag that suppresses further attempts, so one DNS outage does not cause a storm of error toasts.
- reset_network_state()[source]#
Reset the network failure flag — useful between wizard runs.
- Return type:
None
- get_network_error()[source]#
Return the last network error message, or empty string if none.
- Return type:
- class Checker[source]#
Bases:
objectChecks repo availability for a given Ubuntu codename. Run in a background thread — must not touch GTK widgets.
On the first network error (timeout, DNS failure, HTTP error), the checker marks the global network-failed flag so the UI can surface a single alert and all subsequent checks return UNKNOWN immediately.
- check(repo, codename)[source]#
Check whether
repohas packages published forcodename.Suite-agnostic repos always return SUITE_AGNOSTIC without a network call. If the global network-failure flag is set from a previous call, returns UNKNOWN immediately to avoid a cascade of timeouts.
- Parameters:
repo (Repository) – The repository to check.
codename (str) – Ubuntu codename to check against, e.g.
"noble".
- Returns:
Availability status for this repo/codename pair.
- Return type: