pub fn generate_mirrorlist(
mirrors: &[MirrorInfo],
maximum_mirrors: usize,
) -> Result<String>Expand description
What: Generate deterministic pacman mirrorlist text from discovered metadata.
Inputs:
mirrors: Mirror rows from discovery or trusted caller-owned metadata.maximum_mirrors: Explicit cap on generated server lines.
Output:
- Pacman-compatible
Server = .../$repo/os/$archlines for active HTTPS mirrors, sorted and deduplicated.
Details:
- Invalid, inactive, non-HTTPS, oversized, and duplicate base URLs are excluded. No file is written and no command is executed.
- The generated output is independently bounded by
MAX_MIRRORLIST_BYTES.
ยงErrors
Returns InvalidInput for a zero line limit or InputTooLong when valid
input would exceed the generated-output bound.