From: Zbigniew Jędrzejewski-Szmek Date: Fri, 19 Nov 2021 16:26:36 +0000 (+0100) Subject: Add a trivial guard against using the same uuid twice X-Git-Tag: v250-rc1~192^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0fb66ec30bce792dec7185c59e68903f5ba8442;p=thirdparty%2Fsystemd.git Add a trivial guard against using the same uuid twice --- diff --git a/tools/list-discoverable-partitions.py b/tools/list-discoverable-partitions.py index e9a3dce11d4..2ad179c7769 100644 --- a/tools/list-discoverable-partitions.py +++ b/tools/list-discoverable-partitions.py @@ -169,10 +169,16 @@ def generate(defines): print(HEADER, end='') + uuids = set() + for type, arch, uuid in defines: tdesc = TYPES[type] adesc = '' if arch is None else f' ({ARCHITECTURES[arch]})' + # Let's make sure that we didn't select&paste the same value twice + assert uuid not in uuids + uuids.add(uuid) + if type != prevtype: prevtype = type morea, moreb = DESCRIPTIONS[type]