From d672a6c43f1791dc5e99305c3c028f1e206e6d2e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 13 Jun 2025 17:20:52 +0100 Subject: wic: Avoid problems with "-" characters in plugin names Remap "-" characters in plugin names to "_" so wic plugins can be extended using standard python class inheritance. This change means wic files can be incrementally updated over time to the correct name rather than breaking everything. Actual plugin module files will need to be renamed as done in previous patches. Also remove a double call to get_plugins() which isn't needed. (From OE-Core rev: 6d9c76196ffad39e628aff76d53d6ecbb517cfa1) Signed-off-by: Richard Purdie --- scripts/lib/wic/engine.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/lib/wic/engine.py') diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 64b1d52882..b9e60cbe4e 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py @@ -180,6 +180,8 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir, os.makedirs(options.outdir) pname = options.imager + # Don't support '-' in plugin names + pname = pname.replace("-", "_") plugin_class = PluginMgr.get_plugins('imager').get(pname) if not plugin_class: raise WicError('Unknown plugin: %s' % pname) -- cgit v1.2.3-54-g00ecf