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-bridgescript fails, - creating a
SourceInfoV1from the script output fails, - creating a
SourceInfofrom the theSRCINFOfile fails, - or creating JSON representations for either
SRCINFOdata fails in case of mismatch.