Merge branch 'dev' into master
This commit is contained in:
@@ -349,6 +349,17 @@ fn upgrade_solus(ctx: &ExecutionContext) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_pacdef(ctx: &ExecutionContext) -> Result<()> {
|
||||
let pacdef = require("pacdef")?;
|
||||
|
||||
print_separator("pacdef");
|
||||
|
||||
ctx.run_type().execute(&pacdef).arg("sync").check_run()?;
|
||||
|
||||
println!();
|
||||
ctx.run_type().execute(&pacdef).arg("review").check_run()
|
||||
}
|
||||
|
||||
pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> {
|
||||
let pacstall = require("pacstall")?;
|
||||
|
||||
@@ -492,44 +503,50 @@ pub fn flatpak_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let flatpak = require("flatpak")?;
|
||||
let sudo = require_option(ctx.sudo().as_ref(), String::from("sudo is not installed"))?;
|
||||
let cleanup = ctx.config().cleanup();
|
||||
let yes = ctx.config().yes(Step::Flatpak);
|
||||
let run_type = ctx.run_type();
|
||||
print_separator("Flatpak User Packages");
|
||||
|
||||
run_type
|
||||
.execute(&flatpak)
|
||||
.args(&["update", "--user", "-y"])
|
||||
.check_run()?;
|
||||
let mut update_args = vec!["update", "--user"];
|
||||
if yes {
|
||||
update_args.push("-y");
|
||||
}
|
||||
run_type.execute(&flatpak).args(&update_args).check_run()?;
|
||||
|
||||
if cleanup {
|
||||
run_type
|
||||
.execute(&flatpak)
|
||||
.args(&["uninstall", "--user", "--unused"])
|
||||
.check_run()?;
|
||||
let mut cleanup_args = vec!["uninstall", "--user", "--unused"];
|
||||
if yes {
|
||||
cleanup_args.push("-y");
|
||||
}
|
||||
run_type.execute(&flatpak).args(&cleanup_args).check_run()?;
|
||||
}
|
||||
|
||||
print_separator("Flatpak System Packages");
|
||||
if ctx.config().flatpak_use_sudo() || std::env::var("SSH_CLIENT").is_ok() {
|
||||
run_type
|
||||
.execute(&sudo)
|
||||
.arg(&flatpak)
|
||||
.args(&["update", "--system", "-y"])
|
||||
.check_run()?;
|
||||
let mut update_args = vec!["update", "--system"];
|
||||
if yes {
|
||||
update_args.push("-y");
|
||||
}
|
||||
run_type.execute(&sudo).arg(&flatpak).args(&update_args).check_run()?;
|
||||
if cleanup {
|
||||
run_type
|
||||
.execute(sudo)
|
||||
.arg(flatpak)
|
||||
.args(&["uninstall", "--system", "--unused"])
|
||||
.check_run()?;
|
||||
let mut cleanup_args = vec!["uninstall", "--system", "--unused"];
|
||||
if yes {
|
||||
cleanup_args.push("-y");
|
||||
}
|
||||
run_type.execute(sudo).arg(flatpak).args(&cleanup_args).check_run()?;
|
||||
}
|
||||
} else {
|
||||
run_type
|
||||
.execute(&flatpak)
|
||||
.args(&["update", "--system", "-y"])
|
||||
.check_run()?;
|
||||
let mut update_args = vec!["update", "--system"];
|
||||
if yes {
|
||||
update_args.push("-y");
|
||||
}
|
||||
run_type.execute(&flatpak).args(&update_args).check_run()?;
|
||||
if cleanup {
|
||||
run_type
|
||||
.execute(flatpak)
|
||||
.args(&["uninstall", "--system", "--unused"])
|
||||
.check_run()?;
|
||||
let mut cleanup_args = vec!["uninstall", "--system", "--unused"];
|
||||
if yes {
|
||||
cleanup_args.push("-y");
|
||||
}
|
||||
run_type.execute(flatpak).args(&cleanup_args).check_run()?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,6 +575,15 @@ pub fn run_pihole_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()
|
||||
run_type.execute(sudo).arg(pihole).arg("-up").check_run()
|
||||
}
|
||||
|
||||
pub fn run_protonup_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let protonup = require("protonup")?;
|
||||
|
||||
print_separator("protonup");
|
||||
|
||||
ctx.run_type().execute(protonup).check_run()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn run_config_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let sudo = require_option(ctx.sudo().as_ref(), String::from("sudo is not installed"))?;
|
||||
if ctx.config().yes(Step::ConfigUpdate) {
|
||||
|
||||
Reference in New Issue
Block a user