Patchwork [4/7] wic: Parse and pass sourceparams to partition plugin methods

login
register
mail settings
Submitter tom.zanussi@linux.intel.com
Date Aug. 12, 2014, 1:35 a.m.
Message ID <a044a69b57c58eae68b9f66bf01879851019c420.1407806939.git.tom.zanussi@linux.intel.com>
Download mbox | patch
Permalink /patch/77929/
State Accepted
Commit 8d0185f4f838d16c830e73ae901de876f35f63b1
Headers show

Comments

tom.zanussi@linux.intel.com - Aug. 12, 2014, 1:35 a.m.
Add code to parse the sourceparams and pass them to the partition
plugin methods.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
 scripts/lib/wic/kickstart/custom_commands/partition.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

Patch

diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 76cf7a9..a3d5ef3 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -126,6 +126,11 @@  class Wic_PartData(Mic_PartData):
         Prepare content for individual partitions, depending on
         partition command parameters.
         """
+        self.sourceparams_dict = {}
+
+        if self.sourceparams:
+            self.sourceparams_dict = parse_sourceparams(self.sourceparams)
+
         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)
@@ -143,16 +148,19 @@  class Wic_PartData(Mic_PartData):
             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, None, cr, cr_workdir,
+        self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
+                                                       cr, cr_workdir,
                                                        oe_builddir,
                                                        bootimg_dir,
                                                        kernel_dir,
                                                        native_sysroot)
-        self._source_methods["do_stage_partition"](self, None, cr, cr_workdir,
+        self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
+                                                   cr, cr_workdir,
                                                    oe_builddir,
                                                    bootimg_dir, kernel_dir,
                                                    native_sysroot)
-        self._source_methods["do_prepare_partition"](self, None, cr, cr_workdir,
+        self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
+                                                     cr, cr_workdir,
                                                      oe_builddir,
                                                      bootimg_dir, kernel_dir, rootfs_dir,
                                                      native_sysroot)