Make buildah rm quiet
This commit is contained in:
@@ -441,7 +441,7 @@ set_mc_version() {
|
|||||||
# Containerized package manager
|
# Containerized package manager
|
||||||
if create_mc_apt_container &&
|
if create_mc_apt_container &&
|
||||||
MC_VERSION=$(buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) &&
|
MC_VERSION=$(buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) &&
|
||||||
execute buildah rm "$CNT" &&
|
buildah rm "$CNT" &>/dev/null &&
|
||||||
[[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
[[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
MC_VERSION_SOURCE="containerized package manager"
|
MC_VERSION_SOURCE="containerized package manager"
|
||||||
# Fallback to webscrape
|
# Fallback to webscrape
|
||||||
@@ -770,7 +770,8 @@ acquire_deb() {
|
|||||||
|
|
||||||
# Download the deb file using the containerized package manager
|
# Download the deb file using the containerized package manager
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
if ! {
|
if ! {
|
||||||
|
# Download to /tmp to silence _apt permission warnings
|
||||||
create_mc_apt_container "cd /tmp && apt-get download --allow-unauthenticated mediacenter$MC_MVERSION -qq" &&
|
create_mc_apt_container "cd /tmp && apt-get download --allow-unauthenticated mediacenter$MC_MVERSION -qq" &&
|
||||||
env CNT="$CNT" MC_DEB="$MC_DEB" buildah unshare -- bash -eu -o pipefail -c '
|
env CNT="$CNT" MC_DEB="$MC_DEB" buildah unshare -- bash -eu -o pipefail -c '
|
||||||
mnt="$(buildah mount "$CNT")"
|
mnt="$(buildah mount "$CNT")"
|
||||||
@@ -778,7 +779,7 @@ acquire_deb() {
|
|||||||
[[ -n "$deb" ]] && cp -f "$deb" "$MC_DEB"
|
[[ -n "$deb" ]] && cp -f "$deb" "$MC_DEB"
|
||||||
buildah umount "$CNT"' &&
|
buildah umount "$CNT"' &&
|
||||||
[[ -f $MC_DEB ]] &&
|
[[ -f $MC_DEB ]] &&
|
||||||
execute buildah rm "$CNT";
|
buildah rm "$CNT" &>/dev/null;
|
||||||
}; then
|
}; then
|
||||||
debug "Failed to download DEB using containerized package manager"
|
debug "Failed to download DEB using containerized package manager"
|
||||||
echo "Using legacy download method"
|
echo "Using legacy download method"
|
||||||
|
|||||||
Reference in New Issue
Block a user