repoman.upgrade_info#
Ubuntu release info, upgrade target discovery, and PPA availability checks.
Reads /etc/update-manager/release-upgrades and /usr/share/distro-info/ubuntu.csv to determine which Ubuntu releases exist and which the user may upgrade to. Network functions check Launchpad PPA hosting for codename support.
- get_upgrade_prompt()[source]#
Return ‘lts’, ‘normal’, or ‘never’ from /etc/update-manager/release-upgrades.
- Return type:
- get_upgrade_targets(current_codename, prompt)[source]#
Return [(codename, display_label), …] for releases newer than current_codename.
prompt=’lts’ → LTS only; ‘normal’ → all; ‘never’ → []. Includes future/unreleased codenames — PPAs can pre-publish.
- get_all_known_codenames()[source]#
Return all known Ubuntu codenames in release-date order (oldest first).
- get_ppa_suites(owner, ppa, *, timeout=10)[source]#
Return all Ubuntu suite names published by a Launchpad PPA.
Fetches the dists/ directory listing in a single GET request. Returns (frozenset_of_codenames, None) on success, (frozenset(), None) on 404 (PPA exists but no packages), (None, error_str) on network failure.
- check_ppa_for_codename(ppa_owner, ppa_name, codename, *, timeout=10)[source]#
HTTP HEAD to Launchpad PPA InRelease for the given codename.
Returns (AVAILABLE, None) on 200, (UNAVAILABLE, None) on 404, (UNKNOWN, error_message) on anything else. Does not touch the global _network_failed state in checker.py.