From 989ce0cf55818e65511d1d984f3f53f8c386a9c1 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 18 Aug 2011 14:18:46 -0700 Subject: hob: don't try and build if user selects Bake with no selections made If the user hasn't made any selections inform them that they need to do so before clicking Bake. Fixes [YOCTO #1384] (Bitbake rev: e176dcf637da2d0105a4361a46d5df5238e3b8ce) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/hob.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/ui/hob.py') diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index b0a98cbd1d..0230ddaea0 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/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 = "No selections made\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 = "Build empty image or only packages?\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" -- cgit v1.2.3-54-g00ecf