pub fn compare_source_info(
pkgbuild_path: PathBuf,
srcinfo_path: PathBuf,
) -> Result<()>
Expand description
Run the alpm-pkgbuild srcinfo format
command on a PKGBUILD and compare its output with a
given .SRCINFO file.
If the generated and read SRCINFO
representations do not match, the respective files
pkgbuild.json
and srcinfo.json
are output to the current working directory and the function
exits with an exit code of 1
.
These files contain pretty-printed JSON, which accurately depicts the internal representation used to compare the two files.
ยงErrors
Returns an error if
- running the
alpm-pkgbuild-bridge
script fails, - creating a
SourceInfoV1
from the script output fails, - creating a
SourceInfo
from the theSRCINFO
file fails, - or creating JSON representations for either
SRCINFO
data fails in case of mismatch.