def prepare(self, cr, cr_workdir, oe_builddir, rootfs_dir, bootimg_dir, kernel_dir, native_sysroot): """ Prepare content for individual partitions, depending on partition command parameters. """ if not self.source: if self.fstype and self.fstype == "swap": self.prepare_swap_partition(cr_workdir, oe_builddir, native_sysroot) elif self.fstype: self.prepare_empty_partition(cr_workdir, oe_builddir, native_sysroot) return plugins = pluginmgr.get_source_plugins() if self.source not in plugins: msger.error("The '%s' --source specified for %s doesn't exist.\n\tSee 'wic list source-plugins' for a list of available --sources.\n\tSee 'wic help source-plugins' for details on adding a new source plugin." % (self.source, self.mountpoint)) self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) self._source_methods["do_configure_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot) self._source_methods["do_stage_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot) self._source_methods["do_prepare_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, rootfs_dir, native_sysroot)
def list_source_plugins(): """ List the available source plugins i.e. plugins available for --source. """ plugins = pluginmgr.get_source_plugins() for plugin in plugins: print " %s" % plugin
def prepare(self, cr, cr_workdir, oe_builddir, rootfs_dir, bootimg_dir, kernel_dir, native_sysroot): """ Prepare content for individual partitions, depending on partition command parameters. """ if not self.source: if not self.size: msger.error( "The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint) if self.fstype and self.fstype == "swap": self.prepare_swap_partition(cr_workdir, oe_builddir, native_sysroot) elif self.fstype: self.prepare_empty_partition(cr_workdir, oe_builddir, native_sysroot) return plugins = pluginmgr.get_source_plugins() if self.source not in plugins: msger.error( "The '%s' --source specified for %s doesn't exist.\n\tSee 'wic list source-plugins' for a list of available --sources.\n\tSee 'wic help source-plugins' for details on adding a new source plugin." % (self.source, self.mountpoint)) self._source_methods = pluginmgr.get_source_plugin_methods( self.source, partition_methods) self._source_methods["do_configure_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot) self._source_methods["do_stage_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, native_sysroot) self._source_methods["do_prepare_partition"](self, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, rootfs_dir, native_sysroot)