make arch report actual binary in use
This commit is contained in:
@@ -15,7 +15,7 @@ pub struct Arch {
|
||||
pub(crate) packages: HashSet<Package>,
|
||||
}
|
||||
|
||||
const BINARY: Text = "paru";
|
||||
const BINARY: Text = "pacman";
|
||||
const SECTION: Text = "arch";
|
||||
|
||||
const SWITCHES_INFO: Switches = &["--query", "--info"];
|
||||
@@ -26,6 +26,11 @@ const SWITCHES_REMOVE: Switches = &["--remove", "--recursive"];
|
||||
impl Backend for Arch {
|
||||
impl_backend_constants!();
|
||||
|
||||
fn get_binary_inner(&self) -> Text {
|
||||
let r#box = self.binary.clone().into_boxed_str();
|
||||
Box::leak(r#box)
|
||||
}
|
||||
|
||||
fn get_all_installed_packages(&self) -> Result<HashSet<Package>> {
|
||||
let alpm_packages = get_all_installed_packages_from_alpm()
|
||||
.context("getting all installed packages from alpm")?;
|
||||
|
||||
@@ -13,6 +13,9 @@ pub(in crate::backend) type Text = &'static str;
|
||||
|
||||
pub trait Backend: Debug {
|
||||
fn get_binary(&self) -> Text;
|
||||
fn get_binary_inner(&self) -> Text {
|
||||
self.get_binary()
|
||||
}
|
||||
fn get_section(&self) -> Text;
|
||||
|
||||
fn get_switches_info(&self) -> Switches;
|
||||
|
||||
Reference in New Issue
Block a user