Make buildah rm quiet

This commit is contained in:
2025-11-07 22:11:30 -05:00
parent 0ee91075fb
commit 2ac055e827

View File

@@ -441,7 +441,7 @@ set_mc_version() {
# Containerized package manager
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) &&
execute buildah rm "$CNT" &&
buildah rm "$CNT" &>/dev/null &&
[[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
MC_VERSION_SOURCE="containerized package manager"
# Fallback to webscrape
@@ -770,7 +770,8 @@ acquire_deb() {
# Download the deb file using the containerized package manager
# 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" &&
env CNT="$CNT" MC_DEB="$MC_DEB" buildah unshare -- bash -eu -o pipefail -c '
mnt="$(buildah mount "$CNT")"
@@ -778,7 +779,7 @@ acquire_deb() {
[[ -n "$deb" ]] && cp -f "$deb" "$MC_DEB"
buildah umount "$CNT"' &&
[[ -f $MC_DEB ]] &&
execute buildah rm "$CNT";
buildah rm "$CNT" &>/dev/null;
}; then
debug "Failed to download DEB using containerized package manager"
echo "Using legacy download method"