From: Zbigniew Jędrzejewski-Szmek Date: Mon, 11 Sep 2023 09:04:19 +0000 (+0200) Subject: Better log message for --output X-Git-Tag: v17~1^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=557c1abb188e45a98419d87ef8211e602ef1d02d;p=thirdparty%2Fmkosi.git Better log message for --output 207af68047ce22777b06878b7efe77491a7c4108 broke backwards-compat. mkosi-initrd used a call like this: mkosi --default /usr/lib/mkosi-initrd/fedora.mkosi --finalize-script=/usr/lib/mkosi-initrd/mkosi.finalize --image-version=6.5.0-0.rc7.20230821gitf7757129e3de.50.fc39.x86_64 --environment=KERNEL_VERSION=6.5.0-0.rc7.20230821gitf7757129e3de.50.fc39.x86_64 -o /tmp/kernel-install.staging.JEzApD/initrd which is now refused with: /tmp/initrd is not a valid filename which is not very clear, because "/tmp/initrd" is an OK filename. Let's make the error message very clear about what is wrong. --- diff --git a/mkosi/config.py b/mkosi/config.py index 1da591e02..5b1a08777 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -456,7 +456,7 @@ def config_parse_filename(value: Optional[str], old: Optional[str]) -> Optional[ die(". and .. are not valid filenames") if "/" in value: - die(f"{value} is not a valid filename") + die(f"{value!r} is not a valid filename. (Output= requires a filename with no path components, relative to output directory.)") return value