pub fn fetch_srcinfo(
name: &str,
timeout_seconds: Option<u64>,
) -> Result<String, String>Expand description
What: Fetch .SRCINFO content for an AUR package synchronously using curl.
Inputs:
name: AUR package name.timeout_seconds: Optional timeout in seconds (None = no timeout).
Output:
- Returns .SRCINFO content as a string, or an error if fetch fails.
ยงErrors
- Returns
Errwhen network request fails (curl execution error) - Returns
Errwhen .SRCINFO cannot be fetched from AUR - Returns
Errwhen response is empty or contains HTML error page - Returns
Errwhen response does not appear to be valid .SRCINFO format
Details:
- Downloads .SRCINFO from AUR cgit repository.
- Validates that the response is not empty, not HTML, and contains .SRCINFO format markers.