Skip to main content

analyze_foreign_repo_overlap_with_qm_snapshot

Function analyze_foreign_repo_overlap_with_qm_snapshot 

Source
pub fn analyze_foreign_repo_overlap_with_qm_snapshot(
    repo: &str,
    pre_apply_foreign_snapshot: Option<&[(String, String)]>,
) -> Result<ForeignRepoOverlapAnalysis, String>
Expand description

What: Compare foreign installs to pacman -Sl <repo>, using an optional pre-apply pacman -Qm snapshot.

Inputs:

  • repo: Pacman repository name for pacman -Sl.
  • pre_apply_foreign_snapshot: When Some, foreign rows captured when repo apply was queued (before privileged commands). When None, calls list_foreign_packages at analysis time.

Output:

Details:

  • After a repo is enabled, pacman may reclassify installs so they no longer appear in -Qm; the snapshot preserves the pre-enable foreign set without toggling repositories in pacman.conf.

ยงErrors

  • Propagates failures from list_foreign_packages when pre_apply_foreign_snapshot is None, or from [sync_repo_pkgnames_or_empty_if_repo_missing].