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
@@ -18,11 +18,11 @@ use log::{debug, warn};
/// # Returns
/// * The base URL for the PPA (e.g., "https://ppa.launchpadcontent.net/user/ppa_name/ubuntu/")
pub fn ppa_to_base_url(user: &str, name: &str) -> String {
format!("https://ppa.launchpadcontent.net/{}/{}/ubuntu", user, name)
crate::launchpad::ppa_content_url(user, name)
}
fn check_launchpad_repo_sync(package: &str) -> Result<Option<String>, String> {
let url = format!("https://git.launchpad.net/ubuntu/+source/{}", package);
let url = crate::launchpad::ubuntu_source_git_url(package);
// Use libgit2 to check if the remote repository exists
// This is more reliable than HTTP HEAD requests when CGIt is disabled