[bitbake-devel] [PATCH 06/11] hob: don't try and build if user selects Bake with no selections made
Joshua Lock
josh at linux.intel.com
Fri Aug 19 01:08:20 UTC 2011
If the user hasn't made any selections inform them that they need to do so
before clicking Bake.
Fixes [YOCTO #1384]
Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
lib/bb/ui/hob.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index b0a98cb..0230dda 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -405,7 +405,19 @@ class MainWindow (gtk.Window):
build_image = True
rep = self.model.get_build_rep()
- if not rep.base_image:
+
+ # If no base image and no user selected packages don't build anything
+ if not self.selected_image and not len(rep.userpkgs):
+ lbl = "<b>No selections made</b>\nYou have not made any selections"
+ lbl = lbl + " so there isn't anything to bake at this time."
+ dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
+ dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
+ dialog.run()
+ dialog.destroy()
+ return
+ # Else if no base image, ask whether to just build packages or whether
+ # to build a rootfs with the selected packages in
+ elif not self.selected_image:
lbl = "<b>Build empty image or only packages?</b>\nA base image"
lbl = lbl + " has not been selected.\n\'Empty image' will build"
lbl = lbl + " an image with only the selected packages as its"
--
1.7.6
More information about the bitbake-devel
mailing list