disable arch by default

This commit is contained in:
steven-omaha
2023-02-28 12:55:28 +01:00
parent fc78a3b248
commit a9e4162dbf
3 changed files with 13 additions and 5 deletions
+5
View File
@@ -27,3 +27,8 @@ path = "crates/main/main.rs"
lto = "off"
opt-level = "z"
strip = true
[features]
default = []
debian = ["pacdef_core/debian"]
arch = ["pacdef_core/arch"]
+1 -1
View File
@@ -32,6 +32,6 @@ alpm = { version = "2.2", optional = true }
rust-apt = { version = "0.5", optional = true }
[features]
default = ["arch"]
default = []
arch = ["dep:alpm"]
debian = ["dep:rust-apt"]
+4 -1
View File
@@ -109,13 +109,16 @@ impl Pacdef {
to_install
}
#[cfg(feature = "arch")]
#[allow(clippy::unused_self, unused_variables)]
fn overwrite_values_from_config(&mut self, backend: &mut dyn Backend) {
#[cfg(feature = "arch")]
{
if let Some(arch) = backend.as_any_mut().downcast_mut::<crate::backend::Arch>() {
arch.binary = self.config.aur_helper.clone();
arch.aur_rm_args = self.config.aur_rm_args.take();
}
}
}
fn install_packages(&mut self) -> Result<()> {
let to_install = self.get_missing_packages();