query_explicit_packages_sync

Function query_explicit_packages_sync 

Source
pub fn query_explicit_packages_sync(mode: InstalledPackagesMode) -> Vec<String>
Expand description

What: Query pacman directly for explicitly installed packages with the specified mode.

Inputs:

  • mode: Filter mode for installed packages.
    • LeafOnly: Uses pacman -Qetq (explicitly installed AND not required)
    • AllExplicit: Uses pacman -Qeq (all explicitly installed)

Output:

  • Returns a sorted vector of package names, or empty vector on error.

Details:

  • Queries pacman synchronously without using the cache.
  • Used when writing installed_packages.txt to ensure the file reflects the current mode setting.