pub(crate) fn handle_packages(
base_package: Name,
valid_packages: Vec<Name>,
raw_values: HashMap<RawPackageName, HashMap<Keyword, ClearableValue>>,
) -> Result<Vec<Package>, BridgeError>
Expand description
Converts parsed BridgeOutput::packages
output into Package
s.
§Enforced Invariants
All scoped package variables must have a respective entry in pkgbase.pkgname
.
§Errors
Returns an error if
- a
package
function without an alpm-package-name suffix exists in an alpm-split-package setup, - a value cannot be turned into its
alpm_types
equivalent, - multiple values exist for a field that only accepts a singular value,
- an alpm-architecture is duplicated,
- an alpm-architecture is cleared in
package
function, - or an alpm-architecture suffix is set on a keyword that does not support it.