parse_srcinfo

Function parse_srcinfo 

Source
pub fn parse_srcinfo(content: &str) -> SrcinfoData
Expand description

What: Parse full .SRCINFO content into structured data.

Inputs:

  • content: Raw .SRCINFO file content.

Output:

  • Returns SrcinfoData with all parsed fields populated.

Details:

  • Parses all fields from .SRCINFO format including pkgbase, pkgname, pkgver, pkgrel.
  • Extracts all dependency types (depends, makedepends, checkdepends, optdepends).
  • Extracts conflicts, provides, and replaces arrays.
  • For split packages (multiple pkgname), uses the first pkgname found.
  • Handles architecture-specific dependencies by merging into main arrays.
  • Returns default SrcinfoData with empty fields if content is malformed.