ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
8d419f
From b4087419bac3cd656a3f8ba82653750fd60c19b9 Mon Sep 17 00:00:00 2001
8d419f
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
8d419f
Date: Tue, 8 Mar 2022 10:10:12 +0100
8d419f
Subject: [PATCH] man/os-release: add a note about repeating entries
8d419f
8d419f
We didn't actually say that keys should not be repeated. At least the
8d419f
examples in docs (both python and shell) would do that, and any simple
8d419f
parser that builds a dictionary would most likely behave the same way.
8d419f
But let's document this expectation, but also say how to deal with malformed
8d419f
files.
8d419f
8d419f
(cherry picked from commit 3a84a3c9dfde5182398a6d0863a2b2fe90a936b1)
8d419f
8d419f
Related: #2082131
8d419f
---
8d419f
 man/os-release.xml | 4 ++++
8d419f
 1 file changed, 4 insertions(+)
8d419f
8d419f
diff --git a/man/os-release.xml b/man/os-release.xml
8d419f
index 1826a60d1a..baff088bc0 100644
8d419f
--- a/man/os-release.xml
8d419f
+++ b/man/os-release.xml
8d419f
@@ -75,6 +75,10 @@
8d419f
     from earliest boot on, and hence must be located on the root file
8d419f
     system.</para>
8d419f
 
8d419f
+    <para><filename>os-release</filename> must not contain repeating keys. Nevertheless, readers should pick
8d419f
+    the entries later in the file in case of repeats, similarly to how a shell sourcing the file would. A
8d419f
+    reader may warn about repeating entries.</para>
8d419f
+
8d419f
     <para>For a longer rationale for <filename>os-release</filename>
8d419f
     please refer to the 
8d419f
     url="http://0pointer.de/blog/projects/os-release">Announcement of <filename>/etc/os-release</filename></ulink>.</para>