rename backend from pacman to arch

This commit is contained in:
steven-omaha
2023-02-15 10:51:52 +01:00
parent 83fbe765d8
commit 947101eb07
5 changed files with 15 additions and 13 deletions
@@ -9,21 +9,21 @@ use crate::backend::backend_trait::{Backend, Switches, Text};
use crate::{impl_backend_constants, Group, Package};
#[derive(Debug)]
pub struct Pacman {
pub struct Arch {
pub(crate) binary: String,
pub(crate) aur_rm_args: Option<Vec<String>>,
pub(crate) packages: HashSet<Package>,
}
const BINARY: Text = "paru";
const SECTION: Text = "pacman";
const SECTION: Text = "arch";
const SWITCHES_INFO: Switches = &["--query", "--info"];
const SWITCHES_INSTALL: Switches = &["--sync"];
const SWITCHES_MAKE_DEPENDENCY: Switches = &["--database", "--asdeps"];
const SWITCHES_REMOVE: Switches = &["--remove", "--recursive"];
impl Backend for Pacman {
impl Backend for Arch {
impl_backend_constants!();
fn get_all_installed_packages(&self) -> Result<HashSet<Package>> {
@@ -104,7 +104,7 @@ fn get_db_handle() -> Result<Alpm> {
Alpm::new("/", "/var/lib/pacman").context("connecting to DB using expected default values")
}
impl Pacman {
impl Arch {
pub(crate) fn new() -> Self {
Self {
binary: BINARY.to_string(),
+1 -1
View File
@@ -1,2 +1,2 @@
pub mod pacman;
pub mod arch;
pub mod rust;
+1 -1
View File
@@ -12,6 +12,6 @@ use pacdef_macros::Register;
#[derive(Debug, Register)]
pub enum Backends {
Pacman,
Arch,
Rust,
}