Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Use mixer function wrapper when running MCA
Browse files Browse the repository at this point in the history
The function wrappers for mixer should be put into common.sh so that
they are made available to other scripts.  Need to use a mixer function
wrapper when running MCA, which was forgotten on the previous commits.
There are no more cases after this one where mixer is called without a
function wrapper.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
  • Loading branch information
gtkramer authored and mbelluzzo committed Nov 23, 2019
1 parent 1a87528 commit c278fb7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 10 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,13 @@ koji_cmd() {
[[ -n "${result}" ]] && echo "${result}"
return ${ret}
}

mixer_cmd() {
# shellcheck disable=SC2086
mixer ${MIXER_OPTS} "${@}"
}

sudo_mixer_cmd() {
# shellcheck disable=SC2086
sudo -E mixer ${MIXER_OPTS} "${@}"
}
2 changes: 1 addition & 1 deletion release/mca-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for ver in "${mca_versions[@]:1}"; do
log_line

# shellcheck disable=2086
sudo -E mixer --native build validate ${args} | tee "${mca_log}"
sudo_mixer_cmd build validate ${args} | tee "${mca_log}"

# Remove cached RPMs that won't be reused
sudo rm -rf "update/validation/${prev_ver}"
Expand Down
10 changes: 0 additions & 10 deletions release/mixer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ if "${IS_UPSTREAM}" && [[ ${MIXER_OPTS} != *"--offline"* ]]; then
MIXER_OPTS="${MIXER_OPTS} --offline"
fi

mixer_cmd() {
# shellcheck disable=SC2086
mixer ${MIXER_OPTS} "${@}"
}

sudo_mixer_cmd() {
# shellcheck disable=SC2086
sudo -E mixer ${MIXER_OPTS} "${@}"
}

fetch_bundles() {
log_line "Fetching bundles:"
local bundles_dir="${WORK_DIR}/bundles"
Expand Down

0 comments on commit c278fb7

Please sign in to comment.