From: Luca Boccassi Date: Sun, 7 Dec 2025 23:38:51 +0000 (+0000) Subject: mkosi-obs: 'offset' in sd-repart's json might be empty string rather than null X-Git-Tag: v26~23^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f5fed72034bc95eda5e395f649f1d35aca6dc7a;p=thirdparty%2Fmkosi.git mkosi-obs: 'offset' in sd-repart's json might be empty string rather than null [ 67s] ++ systemd-repart --json=short /work/out/nest-octopus_5.2.raw [ 67s] ++ jq -r '.[] | select(.type == "esp") | .offset' [ 67s] No machine ID set, using randomized partition UUIDs. [ 67s] No changes. [ 67s] + offset= [ 67s] + '[' '' = null ']' --- diff --git a/mkosi/resources/mkosi-obs/mkosi.postoutput b/mkosi/resources/mkosi-obs/mkosi.postoutput index 823ad6351..f2a0c86f0 100755 --- a/mkosi/resources/mkosi-obs/mkosi.postoutput +++ b/mkosi/resources/mkosi-obs/mkosi.postoutput @@ -81,7 +81,7 @@ for ddi in "${DDIS[@]}"; do unzstd --force "${ddi}" fi offset="$(systemd-repart --json=short "${ddi%.zst}" | jq -r '.[] | select(.type == "esp") | .offset')" - if [ "$offset" = "null" ]; then + if [ -z "$offset" ] || [ "$offset" = "null" ]; then if [[ $ddi == *.zst ]]; then rm -f "${ddi%.zst}" fi