aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-07-04 19:21:29 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-10 17:37:40 +0100
commit4dff6945d2606cebc0ab26e877c5d8c7b457e179 (patch)
tree29bdf60e3e26e8f0ec6e6852b8023ab5f035e268
parent4f20acc10b18c7353bd73f253943372dacd957ca (diff)
downloadopenembedded-core-contrib-4dff6945d2606cebc0ab26e877c5d8c7b457e179.tar.gz
openembedded-core-contrib-4dff6945d2606cebc0ab26e877c5d8c7b457e179.tar.bz2
openembedded-core-contrib-4dff6945d2606cebc0ab26e877c5d8c7b457e179.zip
wic: Print error if a partition specifies an invalid --source
If a partition specified in a .wks file specifies a nonexistent --source, print an error to that effect and exit. The error text also points the user to a command listing valid sources, and help on adding a new source plugin. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--scripts/lib/mic/kickstart/custom_commands/partition.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py
index 6b575c0e8d9..75ad6ad103a 100644
--- a/scripts/lib/mic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/mic/kickstart/custom_commands/partition.py
@@ -130,6 +130,11 @@ class Wic_PartData(Mic_PartData):
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,