pub fn build_downgrade_command_for_executor(
names: &[String],
_password: Option<&str>,
dry_run: bool,
) -> Result<String, String>Expand description
What: Build downgrade command string without hold tail for PTY execution.
Inputs:
names: Package names to downgrade._password: Optional password (unused - downgrade runs interactively in PTY).dry_run: Whether to run in dry-run mode.
Output:
- Command string ready for
PTYexecution (no hold tail).
Details:
- Uses the
downgradetool to downgrade packages. - Checks if
downgradetool is available before executing. - Read-only package checks use
pacman -Qiwithout privilege escalation. - Removes hold tail since we’re not spawning a terminal.
§Errors
Returns Err when the configured privilege tool cannot be resolved.