Skip to content

Commit 9b52d41

Browse files
committed
feat(oma-pm): set default apt solver to 3.0 on AOSC OS
1 parent e089354 commit 9b52d41

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

oma-pm/src/apt.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,20 @@ impl OmaApt {
311311
config.set_vector("Dpkg::Options::", &dpkg_args);
312312
debug!("dpkg args: {dpkg_args:?}");
313313

314-
for kv in another_apt_options {
315-
let (k, v) = kv.split_once('=').unwrap_or((&kv, ""));
314+
for kv in &another_apt_options {
315+
let (k, v) = kv.split_once('=').unwrap_or((kv, ""));
316316
config.set(k, v);
317317
debug!("{k}={v} is set");
318318
}
319319

320+
#[cfg(feature = "aosc")]
321+
if another_apt_options
322+
.iter()
323+
.all(|kv| !kv.starts_with("APT::Solver"))
324+
{
325+
config.set("APT::Solver", "3.0");
326+
}
327+
320328
Ok(config)
321329
}
322330

0 commit comments

Comments
 (0)