launchpad: drive the endpoints from data/launchpad.yml

This commit is contained in:
2026-09-18 13:27:20 +02:00
parent ead97e1213
commit 7af767898e
5 changed files with 117 additions and 14 deletions
+2 -2
View File
@@ -851,7 +851,7 @@ fn parse_ppa_url(ppa_base_url: &str) -> Option<(String, String)> {
.strip_prefix("https://")
.or_else(|| ppa_base_url.strip_prefix("http://"))?;
let (host, path) = rest.split_once('/')?;
if host != "ppa.launchpadcontent.net" {
if host != crate::launchpad::ppa_content_host() {
return None;
}
@@ -886,7 +886,7 @@ pub async fn ppa_keyring_bytes(
return Ok(cached.clone());
}
let api_url = format!("https://api.launchpad.net/1.0/~{owner}/+archive/ubuntu/{name}");
let api_url = crate::launchpad::archive_url(&owner, &name);
let response = crate::distro_info::http_get_retried(&api_url).await?;
if !response.status().is_success() {
return Err(format!(