* [PATCH 0/4] Various UI fixes related to #1468
@ 2011-09-13 16:21 Joshua Lock
2011-09-13 16:21 ` [PATCH 1/4] ui/crumbs/hobeventhandler: fix test for BBFILES Joshua Lock
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Joshua Lock @ 2011-09-13 16:21 UTC (permalink / raw)
To: bitbake-devel
Yocto #1468 reports several issues when using the recently fixed build again
functionality of hob. This series includes fixes for each of the issues
reported in that bug.
Regards,
Joshua
The following changes since commit 459addf13721a6847406f215650fa1882fb83ea9:
runqueue.py: Ensure fakeroot variables are reflected in the datastore (2011-09-09 19:07:45 +0100)
are available in the git repository at:
git://github.com/incandescant/bitbake uifixes
https://github.com/incandescant/bitbake/tree/uifixes
Joshua Lock (4):
ui/crumbs/hobeventhandler: fix test for BBFILES
ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build
hob: correctly handle an exception
hob: correctly set the selected image when loading a recipe
lib/bb/ui/crumbs/hobeventhandler.py | 42 +++++++++++++++++-----------------
lib/bb/ui/hob.py | 7 +++++-
2 files changed, 27 insertions(+), 22 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] ui/crumbs/hobeventhandler: fix test for BBFILES
2011-09-13 16:21 [PATCH 0/4] Various UI fixes related to #1468 Joshua Lock
@ 2011-09-13 16:21 ` Joshua Lock
2011-09-13 16:21 ` [PATCH 2/4] ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build Joshua Lock
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2011-09-13 16:21 UTC (permalink / raw)
To: bitbake-devel
It seems we have a race whereby the image_dir variable may not be set
before it's tested for, since the variable is always the same set it in the
initialiser.
Partially addresses [YOCTO #1468]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/hobeventhandler.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 66dffac..4ed6590 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -77,7 +77,7 @@ class HobHandler(gobject.GObject):
self.generating = False
self.build_queue = []
self.current_phase = None
- self.image_dir = None
+ self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
self.model = taskmodel
self.server = server
@@ -329,7 +329,6 @@ class HobHandler(gobject.GObject):
return self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"])
def make_temp_dir(self):
- self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
bb.utils.mkdirhier(self.image_dir)
def remove_temp_dir(self):
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build
2011-09-13 16:21 [PATCH 0/4] Various UI fixes related to #1468 Joshua Lock
2011-09-13 16:21 ` [PATCH 1/4] ui/crumbs/hobeventhandler: fix test for BBFILES Joshua Lock
@ 2011-09-13 16:21 ` Joshua Lock
2011-09-13 16:21 ` [PATCH 3/4] hob: correctly handle an exception Joshua Lock
2011-09-13 16:21 ` [PATCH 4/4] hob: correctly set the selected image when loading a recipe Joshua Lock
3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2011-09-13 16:21 UTC (permalink / raw)
To: bitbake-devel
There's no need to check the BBPATH and BBFILES are set correctly each
build when running multiple builds for one launch of the UI.
Partially addresses [YOCTO #1468]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/crumbs/hobeventhandler.py | 39 ++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 4ed6590..8bf599f 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -77,6 +77,8 @@ class HobHandler(gobject.GObject):
self.generating = False
self.build_queue = []
self.current_phase = None
+ self.bbpath_ok = False
+ self.bbfiles_ok = False
self.image_dir = os.path.join(tempfile.gettempdir(), 'hob-images')
self.model = taskmodel
@@ -247,6 +249,8 @@ class HobHandler(gobject.GObject):
def build_image(self, image, configurator):
targets = []
+ nbbp = None
+ nbbf = None
targets.append(image)
if self.build_toolchain and self.build_toolchain_headers:
targets.append("meta-toolchain-sdk")
@@ -254,31 +258,28 @@ class HobHandler(gobject.GObject):
targets.append("meta-toolchain")
self.build_queue = targets
- bbpath_ok = False
- bbpath = self.server.runCommand(["getVariable", "BBPATH"])
- if self.image_dir in bbpath.split(":"):
- bbpath_ok = True
+ if not self.bbpath_ok:
+ bbpath = self.server.runCommand(["getVariable", "BBPATH"])
+ if self.image_dir in bbpath.split(":"):
+ self.bbpath_ok = True
+ else:
+ nbbp = self.image_dir
- bbfiles_ok = False
- bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
- for files in bbfiles:
+ if not self.bbfiles_ok:
import re
pattern = "%s/\*.bb" % self.image_dir
- if re.match(pattern, files):
- bbfiles_ok = True
-
- if not bbpath_ok:
- nbbp = self.image_dir
- else:
- nbbp = None
+ bbfiles = self.server.runCommand(["getVariable", "BBFILES"]).split(" ")
+ for files in bbfiles:
+ if re.match(pattern, files):
+ self.bbfiles_ok = True
- if not bbfiles_ok:
- nbbf = "%s/*.bb" % self.image_dir
- else:
- nbbf = None
+ if not self.bbfiles_ok:
+ nbbf = "%s/*.bb" % self.image_dir
- if not bbfiles_ok or not bbpath_ok:
+ if nbbp or nbbf:
configurator.insertTempBBPath(nbbp, nbbf)
+ self.bbpath_ok = True
+ self.bbfiles_ok = True
self.current_command = self.REPARSE_FILES
self.run_next_command()
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] hob: correctly handle an exception
2011-09-13 16:21 [PATCH 0/4] Various UI fixes related to #1468 Joshua Lock
2011-09-13 16:21 ` [PATCH 1/4] ui/crumbs/hobeventhandler: fix test for BBFILES Joshua Lock
2011-09-13 16:21 ` [PATCH 2/4] ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build Joshua Lock
@ 2011-09-13 16:21 ` Joshua Lock
2011-09-13 16:21 ` [PATCH 4/4] hob: correctly set the selected image when loading a recipe Joshua Lock
3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2011-09-13 16:21 UTC (permalink / raw)
To: bitbake-devel
It doesn't matter if we can't remove the temprorary file, for some reason,
so catch the exception and ignore it.
Partially addresses [YOCTO #1468]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/hob.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 84df37d..8d2d1bd 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -495,7 +495,11 @@ class MainWindow (gtk.Window):
self.back.set_sensitive(True)
self.cancel.set_sensitive(False)
for f in self.files_to_clean:
- os.remove(f)
+ try:
+ os.remove(f)
+ except OSError:
+ pass
+ self.files_to_clean.remove(f)
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."
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] hob: correctly set the selected image when loading a recipe
2011-09-13 16:21 [PATCH 0/4] Various UI fixes related to #1468 Joshua Lock
` (2 preceding siblings ...)
2011-09-13 16:21 ` [PATCH 3/4] hob: correctly handle an exception Joshua Lock
@ 2011-09-13 16:21 ` Joshua Lock
3 siblings, 0 replies; 5+ messages in thread
From: Joshua Lock @ 2011-09-13 16:21 UTC (permalink / raw)
To: bitbake-devel
When the user saves their recipe based on an existing image type, loads it
in a newly run hob instance and clicks bake they should not be asked about
building packages vs an empty image up.
Partially addresses [YOCTO #1468]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/ui/hob.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 8d2d1bd..51a995e 100644
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -144,6 +144,7 @@ class MainWindow (gtk.Window):
self.build_succeeded = False
def image_changed_string_cb(self, model, new_image):
+ self.selected_image = new_image
# disconnect the image combo's signal handler
if self.image_combo_id:
self.image_combo.disconnect(self.image_combo_id)
--
1.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-13 16:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 16:21 [PATCH 0/4] Various UI fixes related to #1468 Joshua Lock
2011-09-13 16:21 ` [PATCH 1/4] ui/crumbs/hobeventhandler: fix test for BBFILES Joshua Lock
2011-09-13 16:21 ` [PATCH 2/4] ui/crumbs/hobeventhandler: don't check BBPATH and BBFILES each build Joshua Lock
2011-09-13 16:21 ` [PATCH 3/4] hob: correctly handle an exception Joshua Lock
2011-09-13 16:21 ` [PATCH 4/4] hob: correctly set the selected image when loading a recipe Joshua Lock
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.