committed by
GitHub
parent
cdbcd7be7a
commit
a519bc5475
@@ -69,6 +69,7 @@
|
||||
#enable_tlmgr = true
|
||||
#emerge_sync_flags = "-q"
|
||||
#emerge_update_flags = "-uDNa --with-bdeps=y world"
|
||||
#redhat_disrto_sync = false
|
||||
|
||||
[windows]
|
||||
# Manually select Windows updates
|
||||
|
||||
@@ -153,6 +153,7 @@ pub struct Linux {
|
||||
trizen_arguments: Option<String>,
|
||||
dnf_arguments: Option<String>,
|
||||
enable_tlmgr: Option<bool>,
|
||||
redhat_distro_sync: Option<bool>,
|
||||
emerge_sync_flags: Option<String>,
|
||||
emerge_update_flags: Option<String>,
|
||||
}
|
||||
@@ -627,7 +628,7 @@ impl Config {
|
||||
.and_then(|vagrant| vagrant.always_suspend)
|
||||
}
|
||||
|
||||
/// Extra yay arguments
|
||||
/// Enable tlmgr on Linux
|
||||
#[allow(dead_code)]
|
||||
pub fn enable_tlmgr_linux(&self) -> bool {
|
||||
self.config_file
|
||||
@@ -637,6 +638,16 @@ impl Config {
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
/// Use distro-sync in Red Hat based distrbutions
|
||||
#[allow(dead_code)]
|
||||
pub fn redhat_distro_sync(&self) -> bool {
|
||||
self.config_file
|
||||
.linux
|
||||
.as_ref()
|
||||
.and_then(|linux| linux.redhat_distro_sync)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
/// Should we ignore failures for this step
|
||||
pub fn ignore_failure(&self, step: Step) -> bool {
|
||||
self.config_file
|
||||
|
||||
@@ -249,7 +249,11 @@ fn upgrade_redhat(ctx: &ExecutionContext) -> Result<()> {
|
||||
.if_exists()
|
||||
.unwrap_or_else(|| Path::new("/usr/bin/yum")),
|
||||
)
|
||||
.arg("upgrade");
|
||||
.arg(if ctx.config().redhat_distro_sync() {
|
||||
"distro-sync"
|
||||
} else {
|
||||
"upgrade"
|
||||
});
|
||||
|
||||
if let Some(args) = ctx.config().dnf_arguments() {
|
||||
command.args(args.split_whitespace());
|
||||
|
||||
Reference in New Issue
Block a user