has_installed_required_by

Function has_installed_required_by 

Source
pub fn has_installed_required_by(name: &str) -> bool
Expand description

What: Check if a package has any installed packages in its “Required By” field.

Inputs:

  • name: Package name to check.

Output:

  • Returns true if the package has at least one installed package in its “Required By” field, false otherwise.

Details:

  • Runs pacman -Qi to query package information and parses the “Required By” field.
  • Checks each package in “Required By” against the installed package cache.
  • Returns false if the package is not installed or if querying fails.