diff options
| author | qvkap <qvkapp@gmail.com> | 2026-09-05 08:29:46 +0300 |
|---|---|---|
| committer | qvkap <qvkapp@gmail.com> | 2026-09-05 08:29:46 +0300 |
| commit | 74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7 (patch) | |
| tree | 7dd16b620d79f579a3ddf4da29e7a55fb585af2f /src/apply.rs | |
| parent | 22f9abec46c28f50df2c19b134da88848942c168 (diff) | |
| download | ror-74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7.tar.gz ror-74c76bb5cea8ff70153a8f9ebe02df6ffb0205f7.zip | |
fix: dependency resolution, update file removal and sync TLS validation
Diffstat (limited to 'src/apply.rs')
| -rwxr-xr-x | src/apply.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/apply.rs b/src/apply.rs index 423a8bc..dd5268d 100755 --- a/src/apply.rs +++ b/src/apply.rs @@ -163,16 +163,17 @@ pub fn apply_system(cfg: &Config, dry_run: bool, custom_config: Option<&Path>) - let installed_set: HashSet<String> = db.packages.keys().cloned().collect(); let mut to_remove: Vec<String> = installed_set.difference(&target_state).cloned().collect(); - if let Err(conflict_err) = resolver::check_conflicts(&required, &db) { - let msg = conflict_err.to_string(); - eprintln!("{} {}", "[ror]".yellow().bold(), msg); - if let Some(pkg_conflict) = msg.split("'").nth(3) { - let pkg = pkg_conflict.to_string(); - if !to_remove.contains(&pkg) { - to_remove.push(pkg); - } - } else { - return Err(conflict_err); + let installed_conflicts = resolver::find_installed_conflicts(&required, &db); + for (req_pkg, inst_pkg) in installed_conflicts { + eprintln!( + "{} Package '{}' conflicts with installed '{}'. Scheduling removal of '{}'.", + "[ror]".yellow().bold(), + req_pkg, + inst_pkg, + inst_pkg + ); + if !to_remove.contains(&inst_pkg) { + to_remove.push(inst_pkg); } } |