summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorrorka900 <rorka900@gmail.com>2026-04-15 20:07:06 +0300
committerrorka900 <rorka900@gmail.com>2026-04-15 20:07:06 +0300
commitd0e15b6670f07925265abd28f67bf59536060fe3 (patch)
treea71c7ad16f6c18cf545c290b404250226edddd2a /src/main.rs
parent7f13d3d133310209cf905c0ca37180baeb52ec56 (diff)
downloadror-d0e15b6670f07925265abd28f67bf59536060fe3.tar.gz
ror-d0e15b6670f07925265abd28f67bf59536060fe3.zip
feat: add package integrity checking and dependency graph updates0.9.0
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/main.rs b/src/main.rs
index 5b93b66..75e2920 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -18,6 +18,7 @@ mod debug;
mod search;
mod repo;
mod progress;
+mod check;
#[derive(Parser, Debug)]
#[command(author, about, arg_required_else_help = true)]
@@ -51,7 +52,7 @@ struct Args {
#[arg(long = "dry-run")]
dry_run: bool,
-
+
#[arg(short = 'u', long = "upgrade")]
upgrade: bool,
@@ -84,6 +85,9 @@ struct Args {
#[arg(long = "lg", alias = "listgroups")]
listgroups: bool,
+
+ #[arg(long = "check")]
+ check: bool,
}
fn run_di(del_pkg: String, inst_pkg: String, cfg: Arc<config::Config>) {
@@ -296,18 +300,8 @@ fn main() {
}
if args.upgrade {
- match cfg.profile.group_name() {
- Some(name) => {
- let recipe = PathBuf::from(format!("/var/ror/packages/groups/{}.yaml", name));
- println!("{} Upgrading via profile group: {}", "[ror]".blue().bold(), name.cyan());
- update::rebuild_from_recipe(&recipe, &cfg);
- }
- None => {
- eprintln!(
- "{} No system profile in ror.conf. Use --up <group> to set a profile first.",
- "[ror]".red().bold()
- );
- }
+ if let Err(e) = update::upgrade_system(&cfg) {
+ eprintln!("{} Upgrade failed: {}", "[ror]".red().bold(), e);
}
return;
}
@@ -365,4 +359,8 @@ fn main() {
group::list_groups();
return;
}
+ if args.check {
+ check::check_integrity(&cfg);
+ return;
+ }
}