get_backup_files

Function get_backup_files 

Source
pub fn get_backup_files(
    name: &str,
    source: &Source,
) -> Result<Vec<String>, String>
Expand description

What: Identify files marked for backup handling during install or removal operations.

Inputs:

  • name: Package whose backup array should be inspected.
  • source: Source descriptor to decide how to gather backup information.

Output:

  • Returns a list of backup file paths or an empty list when the data cannot be retrieved.

ยงErrors

  • Returns Err when pacman -Qii command execution fails for installed packages
  • Returns Err when PKGBUILD or .SRCINFO fetch fails and no fallback is available

Details:

  • Prefers querying the installed package via pacman -Qii; falls back to best-effort heuristics.