summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-09-19 15:25:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-20 22:24:10 +0100
commit081990b2a3d27c83f17d79265d0c77271e9d6638 (patch)
tree16d67549a19232ce5363cf19873af6a6b41e84e6 /bitbake
parent8ebca0c5a85de618b82d1c0e2f526f9c75e3ae68 (diff)
downloadast2050-yocto-poky-081990b2a3d27c83f17d79265d0c77271e9d6638.zip
ast2050-yocto-poky-081990b2a3d27c83f17d79265d0c77271e9d6638.tar.gz
hob: fix build again when building packages only
The different code paths for package vs image builds have lead to some bit rot in the package only build and an incompatability between package only builds and the build again mechanism. This patch unifies the code paths and fixes build again for package only builds. Fixes [YOCTO #1480] (Bitbake rev: ab6c63f35739c30df0e8a9d0f1ae982b96e538ed) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py13
-rw-r--r--bitbake/lib/bb/ui/hob.py11
2 files changed, 12 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 8bf599f..393b407 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -71,7 +71,7 @@ class HobHandler(gobject.GObject):
gobject.GObject.__init__(self)
self.current_command = None
- self.building = None
+ self.building = False
self.build_toolchain = False
self.build_toolchain_headers = False
self.generating = False
@@ -128,10 +128,10 @@ class HobHandler(gobject.GObject):
self.server.runCommand(["resetCooker"])
self.server.runCommand(["reparseFiles"])
elif self.current_command == self.BUILD_IMAGE:
- self.building = "image"
if self.generating:
self.emit("data-generated")
self.generating = False
+ self.building = True
self.server.runCommand(["buildTargets", self.build_queue, "build"])
self.build_queue = []
self.current_command = None
@@ -247,11 +247,12 @@ class HobHandler(gobject.GObject):
pmake = "-j %s" % threads
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", pmake])
- def build_image(self, image, configurator):
+ def build_targets(self, tgts, configurator, build_type="image"):
+ self.build_type = build_type
targets = []
nbbp = None
nbbf = None
- targets.append(image)
+ targets.extend(tgts)
if self.build_toolchain and self.build_toolchain_headers:
targets.append("meta-toolchain-sdk")
elif self.build_toolchain:
@@ -284,10 +285,6 @@ class HobHandler(gobject.GObject):
self.current_command = self.REPARSE_FILES
self.run_next_command()
- def build_packages(self, pkgs):
- self.building = "packages"
- self.server.runCommand(["buildTargets", pkgs, "build"])
-
def cancel_build(self, force=False):
if force:
# Force the cooker to stop as quickly as possible
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index 51a995e..0f738ce 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -459,6 +459,9 @@ class MainWindow (gtk.Window):
image_name = recipepath.rstrip(".bb")
path, sep, image_name = image_name.rpartition("/")
+ image = []
+ image.append(image_name)
+
rep.writeRecipe(recipepath, self.model)
# In the case where we saved the file for the purpose of building
# it we should then delete it so that the users workspace doesn't
@@ -466,9 +469,9 @@ class MainWindow (gtk.Window):
if not self.save_path:
self.files_to_clean.append(recipepath)
- self.handler.build_image(image_name, self.configurator)
+ self.handler.build_targets(image, self.configurator)
else:
- self.handler.build_packages(self.model.get_selected_pn())
+ self.handler.build_targets(self.model.get_selected_pn(), self.configurator, "packages")
# Disable parts of the menu which shouldn't be used whilst building
self.set_menus_sensitive(False)
@@ -490,7 +493,7 @@ class MainWindow (gtk.Window):
def build_complete_cb(self, running_build):
# Have the handler process BB events again
- self.handler.building = None
+ self.handler.building = False
self.stopping = False
self.back.connect("clicked", self.back_button_clicked_cb)
self.back.set_sensitive(True)
@@ -504,7 +507,7 @@ class MainWindow (gtk.Window):
self.files_to_clean = []
lbl = "<b>Build completed</b>\n\nClick 'Edit Image' to start another build or 'View Messages' to view the messages output during the build."
- if self.handler.building == "image" and self.build_succeeded:
+ if self.handler.build_type == "image" and self.build_succeeded:
deploy = self.handler.get_image_deploy_dir()
lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy)
OpenPOWER on IntegriCloud