* [PATCH 0/2] Hob second build fixes
@ 2011-09-05 12:30 Paul Eggleton
2011-09-05 12:30 ` [PATCH 1/2] hob: clear out temporary file list after deleting Paul Eggleton
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Paul Eggleton @ 2011-09-05 12:30 UTC (permalink / raw)
To: bitbake-devel
The following two patches fix problems running the second build within
a single session of the hob UI.
The patches (against Poky, but apply cleanly with -p2 against BitBake
master) are available in the git repository at:
git://git.pokylinux.org/poky-contrib paule/hob-fixes
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/hob-fixes
Paul Eggleton (2):
hob: clear out temporary file list after deleting
hob: fix segfault on second build
bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++
bitbake/lib/bb/ui/hob.py | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/2] hob: clear out temporary file list after deleting
2011-09-05 12:30 [PATCH 0/2] Hob second build fixes Paul Eggleton
@ 2011-09-05 12:30 ` Paul Eggleton
2011-09-05 16:39 ` Joshua Lock
2011-09-05 12:30 ` [PATCH 2/2] hob: fix segfault on second build Paul Eggleton
2011-09-05 19:13 ` [PATCH 0/2] Hob second build fixes Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2011-09-05 12:30 UTC (permalink / raw)
To: bitbake-devel
If you don't clear out files_to_clean after the files get deleted and
then you run a second build, it will try to delete the files from the
first build and you will get a "No such file or directory" error.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/ui/hob.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index c2acada..f2a9ee5 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -496,6 +496,7 @@ class MainWindow (gtk.Window):
self.cancel.set_sensitive(False)
for f in self.files_to_clean:
os.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."
if self.handler.building == "image" and self.build_succeeded:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] hob: clear out temporary file list after deleting
2011-09-05 12:30 ` [PATCH 1/2] hob: clear out temporary file list after deleting Paul Eggleton
@ 2011-09-05 16:39 ` Joshua Lock
0 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2011-09-05 16:39 UTC (permalink / raw)
To: bitbake-devel
On Mon, 2011-09-05 at 13:30 +0100, Paul Eggleton wrote:
> If you don't clear out files_to_clean after the files get deleted and
> then you run a second build, it will try to delete the files from the
> first build and you will get a "No such file or directory" error.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> bitbake/lib/bb/ui/hob.py | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
> index c2acada..f2a9ee5 100644
> --- a/bitbake/lib/bb/ui/hob.py
> +++ b/bitbake/lib/bb/ui/hob.py
> @@ -496,6 +496,7 @@ class MainWindow (gtk.Window):
> self.cancel.set_sensitive(False)
> for f in self.files_to_clean:
> os.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."
> if self.handler.building == "image" and self.build_succeeded:
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] hob: fix segfault on second build
2011-09-05 12:30 [PATCH 0/2] Hob second build fixes Paul Eggleton
2011-09-05 12:30 ` [PATCH 1/2] hob: clear out temporary file list after deleting Paul Eggleton
@ 2011-09-05 12:30 ` Paul Eggleton
2011-09-05 16:39 ` Joshua Lock
2011-09-05 19:13 ` [PATCH 0/2] Hob second build fixes Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2011-09-05 12:30 UTC (permalink / raw)
To: bitbake-devel
Some internal lists were not being cleared, resulting in incorrect
program flow on the second build, causing a structure to be accessed
incorrectly which resulted in a segfault.
Fixes [YOCTO #1332]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++
bitbake/lib/bb/ui/hob.py | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 97d1ebd..c18bd87 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -68,6 +68,11 @@ class RunningBuild (gobject.GObject):
self.model = RunningBuildModel()
self.sequential = sequential
+ def reset (self):
+ self.pids_to_task.clear()
+ self.tasks_to_iter.clear()
+ self.model.clear()
+
def handle_event (self, event, pbar=None):
# Handle an event from the event queue, this may result in updating
# the model and thus the UI. Or it may be to tell us that the build
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index f2a9ee5..76e9237 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -484,7 +484,7 @@ class MainWindow (gtk.Window):
def toggle_createview(self):
self.set_menus_sensitive(True)
- self.build.model.clear()
+ self.build.reset()
self.nb.set_current_page(0)
def build_complete_cb(self, running_build):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] hob: fix segfault on second build
2011-09-05 12:30 ` [PATCH 2/2] hob: fix segfault on second build Paul Eggleton
@ 2011-09-05 16:39 ` Joshua Lock
0 siblings, 0 replies; 6+ messages in thread
From: Joshua Lock @ 2011-09-05 16:39 UTC (permalink / raw)
To: bitbake-devel
On Mon, 2011-09-05 at 13:30 +0100, Paul Eggleton wrote:
> Some internal lists were not being cleared, resulting in incorrect
> program flow on the second build, causing a structure to be accessed
> incorrectly which resulted in a segfault.
>
> Fixes [YOCTO #1332]
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Excellent find Paul!
> ---
> bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++
> bitbake/lib/bb/ui/hob.py | 2 +-
> 2 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
> index 97d1ebd..c18bd87 100644
> --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
> +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
> @@ -68,6 +68,11 @@ class RunningBuild (gobject.GObject):
> self.model = RunningBuildModel()
> self.sequential = sequential
>
> + def reset (self):
> + self.pids_to_task.clear()
> + self.tasks_to_iter.clear()
> + self.model.clear()
> +
> def handle_event (self, event, pbar=None):
> # Handle an event from the event queue, this may result in updating
> # the model and thus the UI. Or it may be to tell us that the build
> diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
> index f2a9ee5..76e9237 100644
> --- a/bitbake/lib/bb/ui/hob.py
> +++ b/bitbake/lib/bb/ui/hob.py
> @@ -484,7 +484,7 @@ class MainWindow (gtk.Window):
>
> def toggle_createview(self):
> self.set_menus_sensitive(True)
> - self.build.model.clear()
> + self.build.reset()
> self.nb.set_current_page(0)
>
> def build_complete_cb(self, running_build):
--
Joshua Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Hob second build fixes
2011-09-05 12:30 [PATCH 0/2] Hob second build fixes Paul Eggleton
2011-09-05 12:30 ` [PATCH 1/2] hob: clear out temporary file list after deleting Paul Eggleton
2011-09-05 12:30 ` [PATCH 2/2] hob: fix segfault on second build Paul Eggleton
@ 2011-09-05 19:13 ` Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2011-09-05 19:13 UTC (permalink / raw)
To: Paul Eggleton; +Cc: bitbake-devel
On Mon, 2011-09-05 at 13:30 +0100, Paul Eggleton wrote:
> The following two patches fix problems running the second build within
> a single session of the hob UI.
>
> The patches (against Poky, but apply cleanly with -p2 against BitBake
> master) are available in the git repository at:
> git://git.pokylinux.org/poky-contrib paule/hob-fixes
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=paule/hob-fixes
>
> Paul Eggleton (2):
> hob: clear out temporary file list after deleting
> hob: fix segfault on second build
>
> bitbake/lib/bb/ui/crumbs/runningbuild.py | 5 +++++
> bitbake/lib/bb/ui/hob.py | 3 ++-
> 2 files changed, 7 insertions(+), 1 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-05 19:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 12:30 [PATCH 0/2] Hob second build fixes Paul Eggleton
2011-09-05 12:30 ` [PATCH 1/2] hob: clear out temporary file list after deleting Paul Eggleton
2011-09-05 16:39 ` Joshua Lock
2011-09-05 12:30 ` [PATCH 2/2] hob: fix segfault on second build Paul Eggleton
2011-09-05 16:39 ` Joshua Lock
2011-09-05 19:13 ` [PATCH 0/2] Hob second build fixes Richard Purdie
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.