summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-08-11 20:35:38 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-15 18:21:52 +0100
commit8d0185f4f838d16c830e73ae901de876f35f63b1 (patch)
treeaad6a035929f065e5540bdc2e693a5ef3a7453c8 /scripts
parente00e902fc7f91be415682e084c839bce7bb64d3f (diff)
downloadpoky-8d0185f4f838d16c830e73ae901de876f35f63b1.tar.gz
wic: Parse and pass sourceparams to partition plugin methods
Add code to parse the sourceparams and pass them to the partition plugin methods. (From OE-Core rev: 769a6f920fb672c50d76bd4bdea4a65fdc18a7b3) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 76cf7a994c..a3d5ef35c7 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):
126 Prepare content for individual partitions, depending on 126 Prepare content for individual partitions, depending on
127 partition command parameters. 127 partition command parameters.
128 """ 128 """
129 self.sourceparams_dict = {}
130
131 if self.sourceparams:
132 self.sourceparams_dict = parse_sourceparams(self.sourceparams)
133
129 if not self.source: 134 if not self.source:
130 if not self.size: 135 if not self.size:
131 msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint) 136 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):
143 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)) 148 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))
144 149
145 self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) 150 self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods)
146 self._source_methods["do_configure_partition"](self, None, cr, cr_workdir, 151 self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
152 cr, cr_workdir,
147 oe_builddir, 153 oe_builddir,
148 bootimg_dir, 154 bootimg_dir,
149 kernel_dir, 155 kernel_dir,
150 native_sysroot) 156 native_sysroot)
151 self._source_methods["do_stage_partition"](self, None, cr, cr_workdir, 157 self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
158 cr, cr_workdir,
152 oe_builddir, 159 oe_builddir,
153 bootimg_dir, kernel_dir, 160 bootimg_dir, kernel_dir,
154 native_sysroot) 161 native_sysroot)
155 self._source_methods["do_prepare_partition"](self, None, cr, cr_workdir, 162 self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
163 cr, cr_workdir,
156 oe_builddir, 164 oe_builddir,
157 bootimg_dir, kernel_dir, rootfs_dir, 165 bootimg_dir, kernel_dir, rootfs_dir,
158 native_sysroot) 166 native_sysroot)