Skip to content

Commit

Permalink
Fix #396 rsaccounting yum install (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Nagler authored Oct 18, 2023
1 parent 30ba364 commit 5c9807a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
5 changes: 0 additions & 5 deletions rsconf/component/rsaccounting.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ def internal_build_compile(self):
from rsconf.component import docker_registry

self.buildt.require_component("nginx")
# much newer than centos 7 version
v = "rclone-1.64.0-1"
self.append_root_bash(
f"rsconf_yum_install_url {v} https://downloads.rclone.org/v1.64.0/{v}-linux-amd64.rpm"
)
jc, z = self.j2_ctx_init()
z._run_u = jc.rsconf_db.run_u
self.__run_d = systemd.docker_unit_prepare(
Expand Down
21 changes: 13 additions & 8 deletions rsconf/package_data/rsconf/rsconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -617,14 +617,8 @@ rsconf_yum_install() {
todo+=( "$x" )
fi
done
declare cmd="${rsconf_yum_install_cmd:-install}"
if [[ ! $cmd =~ ^((re)?install|downgrade)$ ]]; then
install_err "unexpected value rsconf_yum_install_cmd=$cmd"
fi
if (( ${#todo[@]} > 0 )); then
if ! yum "$cmd" --color=never -y -q "${todo[@]}"; then
install_err "FAILED: yum $cmd ${todo[*]}";
fi
_rsconf_yum_install "${todo[@]}"
fi
}

Expand All @@ -634,7 +628,18 @@ rsconf_yum_install_url() {
if rpm -q "$base" >& /dev/null; then
return
fi
rsconf_yum_install "$url"
_rsconf_yum_install "$url"
}

_rsconf_yum_install() {
declare todo=( "$@" )
declare cmd="${rsconf_yum_install_cmd:-install}"
if [[ ! $cmd =~ ^((re)?install|downgrade)$ ]]; then
install_err "unexpected value rsconf_yum_install_cmd=$cmd"
fi
if ! yum "$cmd" --color=never -y -q "${todo[@]}"; then
install_err "FAILED: yum $cmd ${todo[*]}";
fi
}
rsconf_main ${install_extra_args[@]+"${install_extra_args[@]}"}

0 comments on commit 5c9807a

Please sign in to comment.