ryantimwilson / rpms / systemd

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