Skip to main content

build_foreign_to_sync_migrate_bundle

Function build_foreign_to_sync_migrate_bundle 

Source
pub fn build_foreign_to_sync_migrate_bundle(
    tool: PrivilegeTool,
    dry_run: bool,
    pkgs: &[String],
) -> Result<(Vec<String>, Vec<String>), String>
Expand description

What: Build privileged migrate commands: remove foreign packages then install from sync.

Inputs:

  • tool: Active privilege backend.
  • dry_run: When true, emit echo DRY RUN: ... only.
  • pkgs: Package names to remove and reinstall (same pkgname).

Output:

Details:

  • Single transaction chain pacman -Rns then pacman -S for all names.
  • -Rns may remove dependents; UI must warn users before calling.

ยงErrors

  • Returns an error when pkgs is empty or privilege command construction fails.