Skip to main content

get_foreign_packages

Function get_foreign_packages 

Source
pub fn get_foreign_packages() -> HashSet<String>
Expand description

What: Enumerate foreign (locally installed, not in any sync repo) packages.

Inputs:

  • (none): Invokes pacman -Qqm to list foreign package names.

Output:

  • Set of package names whose repository is local (AUR builds, manual installs); empty set on failure (graceful degradation).

Details:

  • Equivalent to checking pacman -Qi Repository: local per package, but in a single subprocess — use for batch local-package filtering.
  • Sets LC_ALL=C and LANG=C for consistent locale-independent output.

§Example

use arch_toolkit::deps::get_foreign_packages;

let foreign = get_foreign_packages();
println!("{} foreign packages installed", foreign.len());