feat: add bootc support to Fedora atomic distros
* feat(bootc): add Bootc support + docs Co-authored-by: Steve Lau <stevelauc@outlook.com> * docs(bootc): specify that itll supercede rpm-ostree if enabled :p --------- Co-authored-by: Steve Lau <stevelauc@outlook.com>
This commit is contained in:
@@ -225,7 +225,12 @@ fn upgrade_wolfi_linux(ctx: &ExecutionContext) -> Result<()> {
|
||||
}
|
||||
|
||||
fn upgrade_redhat(ctx: &ExecutionContext) -> Result<()> {
|
||||
if let Some(ostree) = which("rpm-ostree") {
|
||||
if let Some(bootc) = which("bootc") {
|
||||
if ctx.config().bootc() {
|
||||
let sudo = require_option(ctx.sudo().as_ref(), get_require_sudo_string())?;
|
||||
return ctx.run_type().execute(sudo).arg(&bootc).arg("upgrade").status_checked();
|
||||
}
|
||||
} else if let Some(ostree) = which("rpm-ostree") {
|
||||
if ctx.config().rpm_ostree() {
|
||||
let mut command = ctx.run_type().execute(ostree);
|
||||
command.arg("upgrade");
|
||||
@@ -298,6 +303,13 @@ fn upgrade_nilrt(ctx: &ExecutionContext) -> Result<()> {
|
||||
}
|
||||
|
||||
fn upgrade_fedora_immutable(ctx: &ExecutionContext) -> Result<()> {
|
||||
if let Some(bootc) = which("bootc") {
|
||||
if ctx.config().bootc() {
|
||||
let sudo = require_option(ctx.sudo().as_ref(), get_require_sudo_string())?;
|
||||
return ctx.run_type().execute(sudo).arg(&bootc).arg("upgrade").status_checked();
|
||||
}
|
||||
}
|
||||
|
||||
let ostree = require("rpm-ostree")?;
|
||||
let mut command = ctx.run_type().execute(ostree);
|
||||
command.arg("upgrade");
|
||||
|
||||
Reference in New Issue
Block a user