fetch_srcinfo

Function fetch_srcinfo 

Source
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 Err when network request fails (curl execution error)
  • Returns Err when .SRCINFO cannot be fetched from AUR
  • Returns Err when response is empty or contains HTML error page
  • Returns Err when 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.