pub async fn apply_package_patch(
package_key: &str,
pkg_path: &Path,
files: &HashMap<String, PatchFileInfo>,
sources: &PatchSources<'_>,
uuid: Option<&str>,
dry_run: bool,
force: bool,
) -> ApplyResultExpand description
Verify and apply patches for a single package.
For each file in files, this function:
- Verifies the file is ready to be patched (or already patched).
- If not dry_run, tries patch sources in order: package archive → diff
archive → per-file blob. Each strategy is opt-in via
sources. - Returns a summary of what happened.
uuid is the patch UUID. Pass Some to enable package- and
diff-archive lookup (the corresponding sources.packages_path /
sources.diffs_path must also be set). Pass None to restrict the
pipeline to per-file blobs only — equivalent to pre-2.2 behavior.