From: Luca Boccassi Date: Sun, 17 Aug 2025 18:24:00 +0000 (+0100) Subject: mkosi-obs: use --force also for unzstd X-Git-Tag: v26~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7252146429155b6e26136f9a879f65fbd0cceeef;p=thirdparty%2Fmkosi.git mkosi-obs: use --force also for unzstd Otherwise it will ask interactively whether to overwrite a file, which doesn't work for unattended builds and gets them stuck --- diff --git a/mkosi/resources/mkosi-obs/mkosi.build b/mkosi/resources/mkosi-obs/mkosi.build index c73366fed..8ae619e90 100755 --- a/mkosi/resources/mkosi-obs/mkosi.build +++ b/mkosi/resources/mkosi-obs/mkosi.build @@ -64,7 +64,7 @@ while read -r SIG; do # If there is a DDI with an ESP, add the UKI to it if [ -f "${DEST%efi}raw" ] || [ -f "${DEST%efi}raw.zst" ] || [ -f "${DEST%efi}img" ] || [ -f "${DEST%efi}img.zst" ]; then if [ -f "${DEST%efi}raw.zst" ] || [ -f "${DEST%efi}img.zst" ]; then - unzstd "${DEST%efi}"raw*.zst + unzstd --force "${DEST%efi}"raw*.zst rm -f "${DEST%efi}"raw*.zst recompress=1 else @@ -100,7 +100,7 @@ while read -r BOOTLOADER; do dest="${dest%.sig}" if [ -f "${ddi}.zst" ]; then - unzstd "${ddi}.zst" + unzstd --force "${ddi}.zst" fi offset="$(systemd-repart --json=short "$ddi" | jq -r '.[] | select(.type == "esp") | .offset')" @@ -187,7 +187,7 @@ while read -r SIG; do rm -f "$OUTPUTDIR/$(basename "${SIG%roothash.sig}repart.tar")" if [ -f "$OUTPUTDIR/$(basename "${SIG%roothash.sig}raw.zst")" ] || [ -f "$OUTPUTDIR/$(basename "${SIG%roothash.sig}img.zst")" ]; then recompress=1 - unzstd "$OUTPUTDIR/$(basename "${SIG%roothash.sig}")"raw*.zst + unzstd --force "$OUTPUTDIR/$(basename "${SIG%roothash.sig}")"raw*.zst rm -f "$OUTPUTDIR/$(basename "${SIG%roothash.sig}")"raw*.zst else recompress=0 @@ -259,7 +259,7 @@ if (( ${#AUTHVARS[@]} > 0 )); then [[ "$ddi" =~ -verity ]] && continue if [[ $ddi == *.zst ]]; then - unzstd "${ddi}" + unzstd --force "${ddi}" recompress=1 else recompress=0 diff --git a/mkosi/resources/mkosi-obs/mkosi.postoutput b/mkosi/resources/mkosi-obs/mkosi.postoutput index 65c4000a7..823ad6351 100755 --- a/mkosi/resources/mkosi-obs/mkosi.postoutput +++ b/mkosi/resources/mkosi-obs/mkosi.postoutput @@ -78,7 +78,7 @@ for ddi in "${DDIS[@]}"; do [[ "$ddi" =~ -verity ]] && continue if [[ $ddi == *.zst ]]; then - unzstd "${ddi}" + unzstd --force "${ddi}" fi offset="$(systemd-repart --json=short "${ddi%.zst}" | jq -r '.[] | select(.type == "esp") | .offset')" if [ "$offset" = "null" ]; then