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.
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