Skip to main content

rollback_package_patch

Function rollback_package_patch 

Source
pub async fn rollback_package_patch(
    package_key: &str,
    pkg_path: &Path,
    files: &HashMap<String, PatchFileInfo>,
    blobs_path: &Path,
    dry_run: bool,
) -> RollbackResult
Expand description

Verify and rollback patches for a single package.

For each file in files, this function:

  1. Verifies the file is ready to be rolled back (or already original).
  2. If not dry_run, reads the before-hash blob and writes it back.
  3. Returns a summary of what happened.