diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/lib/wic/engine.py | 2 | ||||
| -rw-r--r-- | scripts/lib/wic/partition.py | 5 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 2 |
3 files changed, 8 insertions, 1 deletions
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, | |||
| 180 | os.makedirs(options.outdir) | 180 | os.makedirs(options.outdir) |
| 181 | 181 | ||
| 182 | pname = options.imager | 182 | pname = options.imager |
| 183 | # Don't support '-' in plugin names | ||
| 184 | pname = pname.replace("-", "_") | ||
| 183 | plugin_class = PluginMgr.get_plugins('imager').get(pname) | 185 | plugin_class = PluginMgr.get_plugins('imager').get(pname) |
| 184 | if not plugin_class: | 186 | if not plugin_class: |
| 185 | raise WicError('Unknown plugin: %s' % pname) | 187 | raise WicError('Unknown plugin: %s' % pname) |
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 5b51ab214f..b34691d313 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
| @@ -164,6 +164,9 @@ class Partition(): | |||
| 164 | 164 | ||
| 165 | plugins = PluginMgr.get_plugins('source') | 165 | plugins = PluginMgr.get_plugins('source') |
| 166 | 166 | ||
| 167 | # Don't support '-' in plugin names | ||
| 168 | self.source = self.source.replace("-", "_") | ||
| 169 | |||
| 167 | if self.source not in plugins: | 170 | if self.source not in plugins: |
| 168 | raise WicError("The '%s' --source specified for %s doesn't exist.\n\t" | 171 | raise WicError("The '%s' --source specified for %s doesn't exist.\n\t" |
| 169 | "See 'wic list source-plugins' for a list of available" | 172 | "See 'wic list source-plugins' for a list of available" |
| @@ -178,7 +181,7 @@ class Partition(): | |||
| 178 | splitted = self.sourceparams.split(',') | 181 | splitted = self.sourceparams.split(',') |
| 179 | srcparams_dict = dict((par.split('=', 1) + [None])[:2] for par in splitted if par) | 182 | srcparams_dict = dict((par.split('=', 1) + [None])[:2] for par in splitted if par) |
| 180 | 183 | ||
| 181 | plugin = PluginMgr.get_plugins('source')[self.source] | 184 | plugin = plugins[self.source] |
| 182 | plugin.do_configure_partition(self, srcparams_dict, creator, | 185 | plugin.do_configure_partition(self, srcparams_dict, creator, |
| 183 | cr_workdir, oe_builddir, bootimg_dir, | 186 | cr_workdir, oe_builddir, bootimg_dir, |
| 184 | kernel_dir, native_sysroot) | 187 | kernel_dir, native_sysroot) |
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 2124ceac7f..6e1f1c8cba 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
| @@ -203,6 +203,8 @@ class DirectPlugin(ImagerPlugin): | |||
| 203 | source_plugin = self.ks.bootloader.source | 203 | source_plugin = self.ks.bootloader.source |
| 204 | disk_name = self.parts[0].disk | 204 | disk_name = self.parts[0].disk |
| 205 | if source_plugin: | 205 | if source_plugin: |
| 206 | # Don't support '-' in plugin names | ||
| 207 | source_plugin = source_plugin.replace("-", "_") | ||
| 206 | plugin = PluginMgr.get_plugins('source')[source_plugin] | 208 | plugin = PluginMgr.get_plugins('source')[source_plugin] |
| 207 | plugin.do_install_disk(self._image, disk_name, self, self.workdir, | 209 | plugin.do_install_disk(self._image, disk_name, self, self.workdir, |
| 208 | self.oe_builddir, self.bootimg_dir, | 210 | self.oe_builddir, self.bootimg_dir, |
