feat: enhance dependency handling in install process and update repo key trust prompt
This commit is contained in:
+14
-12
@@ -1876,6 +1876,7 @@ fn install_planned_packages_to_rootfs(
|
|||||||
is_update: plan.staged.is_update,
|
is_update: plan.staged.is_update,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
install::scripts::run_deferred_hooks_if_possible(rootfs)?;
|
||||||
Ok(installed)
|
Ok(installed)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4885,6 +4886,19 @@ pub fn run(cli: Cli) -> Result<()> {
|
|||||||
"Missing dependencies: {}",
|
"Missing dependencies: {}",
|
||||||
missing_required.join(", ")
|
missing_required.join(", ")
|
||||||
));
|
));
|
||||||
|
if !install_deps {
|
||||||
|
if dry_run {
|
||||||
|
ui::info(
|
||||||
|
"Dry run enabled, stopping before dependency installation/build.",
|
||||||
|
);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
anyhow::bail!(
|
||||||
|
"Missing dependencies: {}. Re-run with --install-deps to install them automatically, or install them manually.",
|
||||||
|
missing_required.join(", ")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let local_sibling_root = spec_path
|
let local_sibling_root = spec_path
|
||||||
.parent()
|
.parent()
|
||||||
.and_then(|p| p.parent())
|
.and_then(|p| p.parent())
|
||||||
@@ -4914,18 +4928,6 @@ pub fn run(cli: Cli) -> Result<()> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
print_plan_summary(&dep_plan);
|
print_plan_summary(&dep_plan);
|
||||||
if !install_deps {
|
|
||||||
if dry_run {
|
|
||||||
ui::info(
|
|
||||||
"Dry run enabled, stopping before dependency installation/build.",
|
|
||||||
);
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
anyhow::bail!(
|
|
||||||
"Missing dependencies: {}. Re-run with --install-deps to install them automatically, or install them manually.",
|
|
||||||
missing_required.join(", ")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if dry_run {
|
if dry_run {
|
||||||
ui::info(
|
ui::info(
|
||||||
"Dry run enabled, stopping before dependency installation/build.",
|
"Dry run enabled, stopping before dependency installation/build.",
|
||||||
|
|||||||
+1
-1
@@ -1061,7 +1061,7 @@ fn try_trust_repo_public_key_for_repo_db(
|
|||||||
repo_name,
|
repo_name,
|
||||||
trusted_dir.display()
|
trusted_dir.display()
|
||||||
);
|
);
|
||||||
if !crate::ui::prompt_yes_no(&prompt, false)? {
|
if !crate::ui::prompt_yes_no(&prompt, true)? {
|
||||||
crate::log_warn!(
|
crate::log_warn!(
|
||||||
"Skipped trusting repo key '{}' for binary repo '{}'",
|
"Skipped trusting repo key '{}' for binary repo '{}'",
|
||||||
key_name,
|
key_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user