]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: partition: Support valueless keys in sourceparams
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Mon, 14 Feb 2022 15:45:17 +0000 (16:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Feb 2022 09:40:40 +0000 (09:40 +0000)
Accept valueless keys in sourceparams without equals sign (=) to match
the comment and support Boolean entries.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/partition.py

index a25834048e81bb6988734e4967363459755c3721..09e491dd494d27ebb558bd983545560c2c250c4f 100644 (file)
@@ -171,7 +171,7 @@ class Partition():
             # Split sourceparams string of the form key1=val1[,key2=val2,...]
             # into a dict.  Also accepts valueless keys i.e. without =
             splitted = self.sourceparams.split(',')
-            srcparams_dict = dict(par.split('=', 1) for par in splitted if par)
+            srcparams_dict = dict((par.split('=', 1) + [None])[:2] for par in splitted if par)
 
         plugin = PluginMgr.get_plugins('source')[self.source]
         plugin.do_configure_partition(self, srcparams_dict, creator,