summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/kickstart/custom_commands/partition.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/kickstart/custom_commands/partition.py')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index fea4d6deb4..045b290ed3 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -157,7 +157,9 @@ class Wic_PartData(Mic_PartData):
157 157
158 if not self.source: 158 if not self.source:
159 if not self.size: 159 if not self.size:
160 msger.error("The %s partition has a size of zero. Please specify a non-zero --size for that partition." % self.mountpoint) 160 msger.error("The %s partition has a size of zero. Please "
161 "specify a non-zero --size for that partition." % \
162 self.mountpoint)
161 if self.fstype and self.fstype == "swap": 163 if self.fstype and self.fstype == "swap":
162 self.prepare_swap_partition(cr_workdir, oe_builddir, 164 self.prepare_swap_partition(cr_workdir, oe_builddir,
163 native_sysroot) 165 native_sysroot)
@@ -178,9 +180,14 @@ class Wic_PartData(Mic_PartData):
178 plugins = pluginmgr.get_source_plugins() 180 plugins = pluginmgr.get_source_plugins()
179 181
180 if self.source not in plugins: 182 if self.source not in plugins:
181 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)) 183 msger.error("The '%s' --source specified for %s doesn't exist.\n\t"
182 184 "See 'wic list source-plugins' for a list of available"
183 self._source_methods = pluginmgr.get_source_plugin_methods(self.source, partition_methods) 185 " --sources.\n\tSee 'wic help source-plugins' for "
186 "details on adding a new source plugin." % \
187 (self.source, self.mountpoint))
188
189 self._source_methods = pluginmgr.get_source_plugin_methods(\
190 self.source, partition_methods)
184 self._source_methods["do_configure_partition"](self, self.sourceparams_dict, 191 self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
185 cr, cr_workdir, 192 cr, cr_workdir,
186 oe_builddir, 193 oe_builddir,
@@ -466,9 +473,10 @@ class Wic_Partition(Mic_Partition):
466 removedAttrs = Mic_Partition.removedAttrs 473 removedAttrs = Mic_Partition.removedAttrs
467 474
468 def _getParser(self): 475 def _getParser(self):
469 def overhead_cb (option, opt_str, value, parser): 476 def overhead_cb(option, opt_str, value, parser):
470 if value < 1: 477 if value < 1:
471 raise OptionValueError("Option %s: invalid value: %r" % (option, value)) 478 raise OptionValueError("Option %s: invalid value: %r" % \
479 (option, value))
472 setattr(parser.values, option.dest, value) 480 setattr(parser.values, option.dest, value)
473 481
474 op = Mic_Partition._getParser(self) 482 op = Mic_Partition._getParser(self)