]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man/os-release: add a note about repeating entries
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 8 Mar 2022 09:10:12 +0000 (10:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 29 Mar 2022 14:17:56 +0000 (16:17 +0200)
We didn't actually say that keys should not be repeated. At least the
examples in docs (both python and shell) would do that, and any simple
parser that builds a dictionary would most likely behave the same way.
But let's document this expectation, but also say how to deal with malformed
files.

man/os-release.xml

index 4acd1a9a575722351b05609cac67471bd0df5db0..7e3e9a73a8cb70900ed0ff2c1b3a6c7896629b56 100644 (file)
     from earliest boot on, and hence must be located on the root file
     system.</para>
 
+    <para><filename>os-release</filename> must not contain repeating keys. Nevertheless, readers should pick
+    the entries later in the file in case of repeats, similarly to how a shell sourcing the file would. A
+    reader may warn about repeating entries.</para>
+
     <para>For a longer rationale for <filename>os-release</filename>
     please refer to the <ulink
     url="http://0pointer.de/blog/projects/os-release">Announcement of <filename>/etc/os-release</filename></ulink>.</para>