diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-08-18 17:50:22 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-23 10:00:34 -0700 |
commit | 5c34022a11fb4f30101d2336cd03c7ea1270ac52 (patch) | |
tree | 213eb1c8d4a0f4bd73e73e07bd02b0aa24d5d236 /bitbake/lib/bb | |
parent | ba6366082185fb61eeec0c74a0464b8d2a81e244 (diff) | |
download | ast2050-yocto-poky-5c34022a11fb4f30101d2336cd03c7ea1270ac52.zip ast2050-yocto-poky-5c34022a11fb4f30101d2336cd03c7ea1270ac52.tar.gz |
bb/ui/hob: warn and prevent image build if no IMAGE_FSTYPE is set
If IMAGE_FSTYPE is empty and the user has opted to build an image warn
them and prevent the build.
Fixes [YOCTO #1267]
(Bitbake rev: 023edbe6d04f25c7e0e7b615eb06cd3727c665cb)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index e02f48c..105b0ef 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py @@ -437,7 +437,22 @@ class MainWindow (gtk.Window): elif response == gtk.RESPONSE_OK: rep.base_image = "empty" - if build_image: + # Ensure at least one value is set in IMAGE_FSTYPES. + have_selected_fstype = False + if (len(self.prefs.selected_image_types) and + len(self.prefs.selected_image_types[0])): + have_selected_fstype = True + + if build_image and not have_selected_fstype: + lbl = "<b>No image output type selected</b>\nThere is no image output" + lbl = lbl + " selected for the build. Please set an output image type" + lbl = lbl + " in the preferences (Edit -> Preferences)." + dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_INFO) + dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) + dialog.run() + dialog.destroy() + return + elif build_image: self.handler.make_temp_dir() recipepath = self.handler.get_temp_recipe_path(rep.base_image) image_name = recipepath.rstrip(".bb") |