* [PATCH 01/11] Hob: add "Close" button to "BinbDialog"
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:38 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 02/11] Hob: Disable the handling of "NoProvider" event Dongxiao Xu
` (9 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
For certain distributions, like FC16, it doesn't have close button in
sub-windows or dialogs. Therefore we need to add an "Close" button to
"BinbDialog" to close the dialog.
Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hig.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index e175a2a..28b7eef 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -94,13 +94,13 @@ class CrumbsMessageDialog(CrumbsDialog):
#
# Brought-in-by Dialog
#
-class BinbDialog(gtk.Dialog):
+class BinbDialog(CrumbsDialog):
"""
A dialog widget to show "brought in by" info when a recipe/package is clicked.
"""
def __init__(self, title, content, parent=None):
- super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, None)
+ super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE))
self.set_position(gtk.WIN_POS_MOUSE)
self.set_resizable(False)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 01/11] Hob: add "Close" button to "BinbDialog"
2012-03-14 9:26 ` [PATCH 01/11] Hob: add "Close" button to "BinbDialog" Dongxiao Xu
@ 2012-03-14 19:38 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:38 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> For certain distributions, like FC16, it doesn't have close button in
> sub-windows or dialogs. Therefore we need to add an "Close" button to
> "BinbDialog" to close the dialog.
>
> Besides, let BinbDialog inherits the CrumbsDialog instead of gtk.Dialog
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
I think we want to switch to persistent tooltips for this functionality
but until that change is ready this is a good patch.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/hig.py | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
> index e175a2a..28b7eef 100644
> --- a/lib/bb/ui/crumbs/hig.py
> +++ b/lib/bb/ui/crumbs/hig.py
> @@ -94,13 +94,13 @@ class CrumbsMessageDialog(CrumbsDialog):
> #
> # Brought-in-by Dialog
> #
> -class BinbDialog(gtk.Dialog):
> +class BinbDialog(CrumbsDialog):
> """
> A dialog widget to show "brought in by" info when a recipe/package is clicked.
> """
>
> def __init__(self, title, content, parent=None):
> - super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, None)
> + super(BinbDialog, self).__init__(title, parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, ("Close", gtk.RESPONSE_CLOSE))
>
> self.set_position(gtk.WIN_POS_MOUSE)
> self.set_resizable(False)
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 02/11] Hob: Disable the handling of "NoProvider" event
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
2012-03-14 9:26 ` [PATCH 01/11] Hob: add "Close" button to "BinbDialog" Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 03/11] cooker: add package rdepends and rrecommends info Dongxiao Xu
` (8 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Currently for non-x86 architecture, there are un-resolved dependency
issue when generate universe dependency tree. Therefore disable the
handling of "NoProvider" event in Hob to enable the build for non-x86
architectures. After we resolved the dependency for universe, we still
need to handle this event in Hob.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hobeventhandler.py | 37 ++++++++++++++++++----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 6c109fc..9c82bfe 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -215,23 +215,26 @@ class HobHandler(gobject.GObject):
elif isinstance(event, bb.command.CommandCompleted):
self.current_phase = None
self.run_next_command()
-
- elif isinstance(event, bb.event.NoProvider):
- if event._runtime:
- r = "R"
- else:
- r = ""
- if event._dependees:
- self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
- else:
- self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
- if event._reasons:
- for reason in event._reasons:
- self.error_msg += " %s" % reason
-
- self.commands_async = []
- self.emit("command-failed", self.error_msg)
- self.error_msg = ""
+ # TODO: Currently there are NoProvider issues when generate
+ # universe tree dependency for non-x86 architecture.
+ # Comment the follow code to enable the build of non-x86
+ # architectures in Hob.
+ #elif isinstance(event, bb.event.NoProvider):
+ # if event._runtime:
+ # r = "R"
+ # else:
+ # r = ""
+ # if event._dependees:
+ # self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
+ # else:
+ # self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
+ # if event._reasons:
+ # for reason in event._reasons:
+ # self.error_msg += " %s" % reason
+
+ # self.commands_async = []
+ # self.emit("command-failed", self.error_msg)
+ # self.error_msg = ""
elif isinstance(event, bb.command.CommandFailed):
self.commands_async = []
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 02/11] Hob: Disable the handling of "NoProvider" event
2012-03-14 9:26 ` [PATCH 02/11] Hob: Disable the handling of "NoProvider" event Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
2012-03-15 8:31 ` Xu, Dongxiao
0 siblings, 1 reply; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Currently for non-x86 architecture, there are un-resolved dependency
> issue when generate universe dependency tree. Therefore disable the
> handling of "NoProvider" event in Hob to enable the build for non-x86
> architectures. After we resolved the dependency for universe, we still
> need to handle this event in Hob.
I'm not sure we'll ever be able to strongly guarantee that NoProvider
issues won't creep in. Would we better off coming up with a more tenable
long term solution?
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
This is a reasonable short-term solution
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/hobeventhandler.py | 37 ++++++++++++++++++----------------
> 1 files changed, 20 insertions(+), 17 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
> index 6c109fc..9c82bfe 100644
> --- a/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -215,23 +215,26 @@ class HobHandler(gobject.GObject):
> elif isinstance(event, bb.command.CommandCompleted):
> self.current_phase = None
> self.run_next_command()
> -
> - elif isinstance(event, bb.event.NoProvider):
> - if event._runtime:
> - r = "R"
> - else:
> - r = ""
> - if event._dependees:
> - self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
> - else:
> - self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
> - if event._reasons:
> - for reason in event._reasons:
> - self.error_msg += " %s" % reason
> -
> - self.commands_async = []
> - self.emit("command-failed", self.error_msg)
> - self.error_msg = ""
> + # TODO: Currently there are NoProvider issues when generate
> + # universe tree dependency for non-x86 architecture.
> + # Comment the follow code to enable the build of non-x86
> + # architectures in Hob.
> + #elif isinstance(event, bb.event.NoProvider):
> + # if event._runtime:
> + # r = "R"
> + # else:
> + # r = ""
> + # if event._dependees:
> + # self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
> + # else:
> + # self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
> + # if event._reasons:
> + # for reason in event._reasons:
> + # self.error_msg += " %s" % reason
> +
> + # self.commands_async = []
> + # self.emit("command-failed", self.error_msg)
> + # self.error_msg = ""
>
> elif isinstance(event, bb.command.CommandFailed):
> self.commands_async = []
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 02/11] Hob: Disable the handling of "NoProvider" event
2012-03-14 19:37 ` Joshua Lock
@ 2012-03-15 8:31 ` Xu, Dongxiao
2012-03-15 22:35 ` Joshua Lock
0 siblings, 1 reply; 29+ messages in thread
From: Xu, Dongxiao @ 2012-03-15 8:31 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>
> On 14/03/12 02:26, Dongxiao Xu wrote:
> > Currently for non-x86 architecture, there are un-resolved dependency
> > issue when generate universe dependency tree. Therefore disable the
> > handling of "NoProvider" event in Hob to enable the build for non-x86
> > architectures. After we resolved the dependency for universe, we still
> > need to handle this event in Hob.
>
> I'm not sure we'll ever be able to strongly guarantee that NoProvider
> issues won't creep in. Would we better off coming up with a more tenable
> long term solution?
The current code is a strict check for NoProvider issue. Do you have any
suggestion on this one? What about putting the NoProvider error in
building time?
Thanks,
Dongxiao
>
> >
> > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
>
> This is a reasonable short-term solution
>
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
>
> > ---
> > lib/bb/ui/crumbs/hobeventhandler.py | 37 ++++++++++++++++++----------------
> > 1 files changed, 20 insertions(+), 17 deletions(-)
> >
> > diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
> > index 6c109fc..9c82bfe 100644
> > --- a/lib/bb/ui/crumbs/hobeventhandler.py
> > +++ b/lib/bb/ui/crumbs/hobeventhandler.py
> > @@ -215,23 +215,26 @@ class HobHandler(gobject.GObject):
> > elif isinstance(event, bb.command.CommandCompleted):
> > self.current_phase = None
> > self.run_next_command()
> > -
> > - elif isinstance(event, bb.event.NoProvider):
> > - if event._runtime:
> > - r = "R"
> > - else:
> > - r = ""
> > - if event._dependees:
> > - self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
> > - else:
> > - self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
> > - if event._reasons:
> > - for reason in event._reasons:
> > - self.error_msg += " %s" % reason
> > -
> > - self.commands_async = []
> > - self.emit("command-failed", self.error_msg)
> > - self.error_msg = ""
> > + # TODO: Currently there are NoProvider issues when generate
> > + # universe tree dependency for non-x86 architecture.
> > + # Comment the follow code to enable the build of non-x86
> > + # architectures in Hob.
> > + #elif isinstance(event, bb.event.NoProvider):
> > + # if event._runtime:
> > + # r = "R"
> > + # else:
> > + # r = ""
> > + # if event._dependees:
> > + # self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
> > + # else:
> > + # self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
> > + # if event._reasons:
> > + # for reason in event._reasons:
> > + # self.error_msg += " %s" % reason
> > +
> > + # self.commands_async = []
> > + # self.emit("command-failed", self.error_msg)
> > + # self.error_msg = ""
> >
> > elif isinstance(event, bb.command.CommandFailed):
> > self.commands_async = []
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 02/11] Hob: Disable the handling of "NoProvider" event
2012-03-15 8:31 ` Xu, Dongxiao
@ 2012-03-15 22:35 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-15 22:35 UTC (permalink / raw)
To: Xu, Dongxiao; +Cc: bitbake-devel
On 15/03/12 01:31, Xu, Dongxiao wrote:
> On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>>
>> On 14/03/12 02:26, Dongxiao Xu wrote:
>>> Currently for non-x86 architecture, there are un-resolved dependency
>>> issue when generate universe dependency tree. Therefore disable the
>>> handling of "NoProvider" event in Hob to enable the build for non-x86
>>> architectures. After we resolved the dependency for universe, we still
>>> need to handle this event in Hob.
>>
>> I'm not sure we'll ever be able to strongly guarantee that NoProvider
>> issues won't creep in. Would we better off coming up with a more tenable
>> long term solution?
>
> The current code is a strict check for NoProvider issue. Do you have any
> suggestion on this one? What about putting the NoProvider error in
> building time?
The ideal, from a user perspective, would I think be that any NoProvider
recipes just aren't included in the list of available recipes/packages.
Joshua
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 03/11] cooker: add package rdepends and rrecommends info
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
2012-03-14 9:26 ` [PATCH 01/11] Hob: add "Close" button to "BinbDialog" Dongxiao Xu
2012-03-14 9:26 ` [PATCH 02/11] Hob: Disable the handling of "NoProvider" event Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 04/11] Hob: Fix the image installation dependency Dongxiao Xu
` (7 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
When calculating the image installation dependency, we need the
rdepends and rrecommends information of certain packages.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/cooker.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 78d8754..eada435 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -479,7 +479,6 @@ class BBCooker:
depend_tree["pn"][pn]["license"] = lic
depend_tree["pn"][pn]["section"] = section
depend_tree["pn"][pn]["description"] = description
- depend_tree["pn"][pn]["packages"] = rdepends.keys()
if fnid not in seen_fnids:
seen_fnids.append(fnid)
@@ -510,6 +509,9 @@ class BBCooker:
pn_rprovider = item
depend_tree["rdepends-pn"][pn].append(pn_rprovider)
+ depend_tree["rdepends-pkg"].update(rdepends)
+ depend_tree["rrecs-pkg"].update(rrecs)
+
return depend_tree
def generateDepTreeEvent(self, pkgs_to_build, task):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 03/11] cooker: add package rdepends and rrecommends info
2012-03-14 9:26 ` [PATCH 03/11] cooker: add package rdepends and rrecommends info Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> When calculating the image installation dependency, we need the
> rdepends and rrecommends information of certain packages.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/cooker.py | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
> index 78d8754..eada435 100644
> --- a/lib/bb/cooker.py
> +++ b/lib/bb/cooker.py
> @@ -479,7 +479,6 @@ class BBCooker:
> depend_tree["pn"][pn]["license"] = lic
> depend_tree["pn"][pn]["section"] = section
> depend_tree["pn"][pn]["description"] = description
> - depend_tree["pn"][pn]["packages"] = rdepends.keys()
>
> if fnid not in seen_fnids:
> seen_fnids.append(fnid)
> @@ -510,6 +509,9 @@ class BBCooker:
> pn_rprovider = item
> depend_tree["rdepends-pn"][pn].append(pn_rprovider)
>
> + depend_tree["rdepends-pkg"].update(rdepends)
> + depend_tree["rrecs-pkg"].update(rrecs)
> +
> return depend_tree
>
> def generateDepTreeEvent(self, pkgs_to_build, task):
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 04/11] Hob: Fix the image installation dependency
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (2 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 03/11] cooker: add package rdepends and rrecommends info Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page Dongxiao Xu
` (6 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Get the image installation content from rdepends and rrecommends
variables.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hoblistmodel.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 0b7c0cb..0378828 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -546,9 +546,7 @@ class RecipeListModel(gtk.ListStore):
group = event_model["pn"][item]["section"]
install = []
- depends = event_model["depends"].get(item, [])
- rdepends = event_model["rdepends-pn"].get(item, [])
- depends = depends + rdepends
+ depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
if ('task-' in name):
if ('lib32-' in name or 'lib64-' in name):
@@ -557,7 +555,7 @@ class RecipeListModel(gtk.ListStore):
atype = 'task'
elif ('-image-' in name):
atype = 'image'
- install = rdepends
+ install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
elif ('meta-' in name):
atype = 'toolchain'
elif (name == 'dummy-image' or name == 'dummy-toolchain'):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 04/11] Hob: Fix the image installation dependency
2012-03-14 9:26 ` [PATCH 04/11] Hob: Fix the image installation dependency Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
2012-03-15 6:02 ` Xu, Dongxiao
0 siblings, 1 reply; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Get the image installation content from rdepends and rrecommends
> variables.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
> ---
> lib/bb/ui/crumbs/hoblistmodel.py | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index 0b7c0cb..0378828 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -546,9 +546,7 @@ class RecipeListModel(gtk.ListStore):
> group = event_model["pn"][item]["section"]
> install = []
>
> - depends = event_model["depends"].get(item, [])
> - rdepends = event_model["rdepends-pn"].get(item, [])
> - depends = depends + rdepends
> + depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
>
> if ('task-' in name):
> if ('lib32-' in name or 'lib64-' in name):
> @@ -557,7 +555,7 @@ class RecipeListModel(gtk.ListStore):
> atype = 'task'
> elif ('-image-' in name):
> atype = 'image'
> - install = rdepends
> + install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
rrecs should be recommendations, not requirements - are we making the
conscious decision to include all recommended packages when building
with Hob?
> elif ('meta-' in name):
> atype = 'toolchain'
> elif (name == 'dummy-image' or name == 'dummy-toolchain'):
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 04/11] Hob: Fix the image installation dependency
2012-03-14 19:37 ` Joshua Lock
@ 2012-03-15 6:02 ` Xu, Dongxiao
2012-03-15 17:47 ` Joshua Lock
0 siblings, 1 reply; 29+ messages in thread
From: Xu, Dongxiao @ 2012-03-15 6:02 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>
> On 14/03/12 02:26, Dongxiao Xu wrote:
> > Get the image installation content from rdepends and rrecommends
> > variables.
> >
> > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
> > ---
> > lib/bb/ui/crumbs/hoblistmodel.py | 6 ++----
> > 1 files changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> > index 0b7c0cb..0378828 100644
> > --- a/lib/bb/ui/crumbs/hoblistmodel.py
> > +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> > @@ -546,9 +546,7 @@ class RecipeListModel(gtk.ListStore):
> > group = event_model["pn"][item]["section"]
> > install = []
> >
> > - depends = event_model["depends"].get(item, [])
> > - rdepends = event_model["rdepends-pn"].get(item, [])
> > - depends = depends + rdepends
> > + depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
> >
> > if ('task-' in name):
> > if ('lib32-' in name or 'lib64-' in name):
> > @@ -557,7 +555,7 @@ class RecipeListModel(gtk.ListStore):
> > atype = 'task'
> > elif ('-image-' in name):
> > atype = 'image'
> > - install = rdepends
> > + install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
>
> rrecs should be recommendations, not requirements - are we making the
> conscious decision to include all recommended packages when building
> with Hob?
Per my understanding, RRECOMMENDS means that if the recommended package
do exists, then install it. Else if it doesn't, system will not report
error as missing dependency. (Correct me if it is wrong)
Here in Hob code, we will try to install both RDEPENDS and RRECOMMENDS
packages. But note that here the "install" variable is only used to make
selections in "Package Selection" page. Therefore if a recommended
package doesn't exists, it will not be included in the installation
list.
Thanks,
Dongxiao
>
> > elif ('meta-' in name):
> > atype = 'toolchain'
> > elif (name == 'dummy-image' or name == 'dummy-toolchain'):
>
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 04/11] Hob: Fix the image installation dependency
2012-03-15 6:02 ` Xu, Dongxiao
@ 2012-03-15 17:47 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-15 17:47 UTC (permalink / raw)
To: Xu, Dongxiao; +Cc: bitbake-devel
On 14/03/12 23:02, Xu, Dongxiao wrote:
> On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>>
>> On 14/03/12 02:26, Dongxiao Xu wrote:
>>> Get the image installation content from rdepends and rrecommends
>>> variables.
>>>
>>> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
>>> ---
>>> lib/bb/ui/crumbs/hoblistmodel.py | 6 ++----
>>> 1 files changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
>>> index 0b7c0cb..0378828 100644
>>> --- a/lib/bb/ui/crumbs/hoblistmodel.py
>>> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
>>> @@ -546,9 +546,7 @@ class RecipeListModel(gtk.ListStore):
>>> group = event_model["pn"][item]["section"]
>>> install = []
>>>
>>> - depends = event_model["depends"].get(item, [])
>>> - rdepends = event_model["rdepends-pn"].get(item, [])
>>> - depends = depends + rdepends
>>> + depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
>>>
>>> if ('task-' in name):
>>> if ('lib32-' in name or 'lib64-' in name):
>>> @@ -557,7 +555,7 @@ class RecipeListModel(gtk.ListStore):
>>> atype = 'task'
>>> elif ('-image-' in name):
>>> atype = 'image'
>>> - install = rdepends
>>> + install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
>>
>> rrecs should be recommendations, not requirements - are we making the
>> conscious decision to include all recommended packages when building
>> with Hob?
>
> Per my understanding, RRECOMMENDS means that if the recommended package
> do exists, then install it. Else if it doesn't, system will not report
> error as missing dependency. (Correct me if it is wrong)
I thought that the behaviour was dependant on which package backend you
use (RPM, etc.) but the Yocto documentation agrees with your assertion
so this behaviour seems reasonable.
Cheers,
Joshua
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (3 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 04/11] Hob: Fix the image installation dependency Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 06/11] Hob: Remove the indication in machine/base image combobox Dongxiao Xu
` (5 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 6 ------
lib/bb/ui/crumbs/packageselectionpage.py | 11 -----------
lib/bb/ui/crumbs/recipeselectionpage.py | 9 ---------
3 files changed, 0 insertions(+), 26 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index a905030..f9844de 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -361,12 +361,6 @@ class Builder(gtk.Window):
self.handler.set_extra_config(self.configuration.extra_setting)
self.handler.set_extra_inherit("packageinfo")
- def reset_recipe_model(self):
- self.recipe_model.reset()
-
- def reset_package_model(self):
- self.package_model.reset()
-
def update_recipe_model(self, selected_image, selected_recipes):
self.recipe_model.set_selected_image(selected_image)
self.recipe_model.set_selected_recipes(selected_recipes)
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index a8628ac..0427fe2 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -118,12 +118,6 @@ class PackageSelectionPage (HobPage):
if self.pages[i]['name'] == "Included":
tab.connect("row-activated", self.tree_row_activated_cb)
- reset_button = gtk.Button("Reset")
- reset_button.connect("clicked", self.reset_clicked_cb)
- hbox = gtk.HBox(False, 5)
- hbox.pack_end(reset_button, expand=False, fill=False)
- tab.pack_start(hbox, expand=False, fill=False)
-
label = gtk.Label(self.pages[i]['name'])
self.ins.append_page(tab, label)
self.tables.append(tab)
@@ -206,11 +200,6 @@ class PackageSelectionPage (HobPage):
size_str = str(size) + ' KB'
return size_str
- # Callback functions
- def reset_clicked_cb(self, button):
- self.package_model.reset()
- self.builder.reset_package_model()
-
def toggle_item_idle_cb(self, path):
if not self.package_model.path_included(path):
self.package_model.include_item(item_path=path, binb="User Selected")
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index aea9c0c..234734c 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -141,11 +141,6 @@ class RecipeSelectionPage (HobPage):
tab.connect("toggled", self.table_toggled_cb)
if self.pages[i]['name'] == "Included":
tab.connect("row-activated", self.tree_row_activated_cb)
- reset_button = gtk.Button("Reset")
- reset_button.connect("clicked", self.reset_clicked_cb)
- hbox = gtk.HBox(False, 5)
- hbox.pack_end(reset_button, expand=False, fill=False)
- tab.pack_start(hbox, expand=False, fill=False)
label = gtk.Label(self.pages[i]['name'])
self.ins.append_page(tab, label)
@@ -201,10 +196,6 @@ class RecipeSelectionPage (HobPage):
self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
- # Callback functions
- def reset_clicked_cb(self, button):
- self.builder.reset_recipe_model()
-
def toggle_item_idle_cb(self, path):
if not self.recipe_model.path_included(path):
self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page
2012-03-14 9:26 ` [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 6 ------
> lib/bb/ui/crumbs/packageselectionpage.py | 11 -----------
> lib/bb/ui/crumbs/recipeselectionpage.py | 9 ---------
> 3 files changed, 0 insertions(+), 26 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index a905030..f9844de 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -361,12 +361,6 @@ class Builder(gtk.Window):
> self.handler.set_extra_config(self.configuration.extra_setting)
> self.handler.set_extra_inherit("packageinfo")
>
> - def reset_recipe_model(self):
> - self.recipe_model.reset()
> -
> - def reset_package_model(self):
> - self.package_model.reset()
> -
> def update_recipe_model(self, selected_image, selected_recipes):
> self.recipe_model.set_selected_image(selected_image)
> self.recipe_model.set_selected_recipes(selected_recipes)
> diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
> index a8628ac..0427fe2 100755
> --- a/lib/bb/ui/crumbs/packageselectionpage.py
> +++ b/lib/bb/ui/crumbs/packageselectionpage.py
> @@ -118,12 +118,6 @@ class PackageSelectionPage (HobPage):
> if self.pages[i]['name'] == "Included":
> tab.connect("row-activated", self.tree_row_activated_cb)
>
> - reset_button = gtk.Button("Reset")
> - reset_button.connect("clicked", self.reset_clicked_cb)
> - hbox = gtk.HBox(False, 5)
> - hbox.pack_end(reset_button, expand=False, fill=False)
> - tab.pack_start(hbox, expand=False, fill=False)
> -
> label = gtk.Label(self.pages[i]['name'])
> self.ins.append_page(tab, label)
> self.tables.append(tab)
> @@ -206,11 +200,6 @@ class PackageSelectionPage (HobPage):
> size_str = str(size) + ' KB'
> return size_str
>
> - # Callback functions
> - def reset_clicked_cb(self, button):
> - self.package_model.reset()
> - self.builder.reset_package_model()
> -
> def toggle_item_idle_cb(self, path):
> if not self.package_model.path_included(path):
> self.package_model.include_item(item_path=path, binb="User Selected")
> diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> index aea9c0c..234734c 100755
> --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> @@ -141,11 +141,6 @@ class RecipeSelectionPage (HobPage):
> tab.connect("toggled", self.table_toggled_cb)
> if self.pages[i]['name'] == "Included":
> tab.connect("row-activated", self.tree_row_activated_cb)
> - reset_button = gtk.Button("Reset")
> - reset_button.connect("clicked", self.reset_clicked_cb)
> - hbox = gtk.HBox(False, 5)
> - hbox.pack_end(reset_button, expand=False, fill=False)
> - tab.pack_start(hbox, expand=False, fill=False)
>
> label = gtk.Label(self.pages[i]['name'])
> self.ins.append_page(tab, label)
> @@ -201,10 +196,6 @@ class RecipeSelectionPage (HobPage):
> self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
> self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
>
> - # Callback functions
> - def reset_clicked_cb(self, button):
> - self.builder.reset_recipe_model()
> -
> def toggle_item_idle_cb(self, path):
> if not self.recipe_model.path_included(path):
> self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 06/11] Hob: Remove the indication in machine/base image combobox
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (4 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 05/11] Hob: Remove the reset button in recipe/package selection page Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 07/11] Hob: Remove the recipe/package populated signal Dongxiao Xu
` (4 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Remove the "--select a machine--" prompt in machine selection.
Also change "--select a base image--" to "Start from scratch" for
base image selection.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hoblistmodel.py | 2 +-
lib/bb/ui/crumbs/imageconfigurationpage.py | 20 +++++++-------------
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index 0378828..c19aaa8 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -422,7 +422,7 @@ class RecipeListModel(gtk.ListStore):
"""
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11)
- __dummy_image__ = "--select a base image--"
+ __dummy_image__ = "Start from scratch"
__gsignals__ = {
"recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index f029bf8..3b1201e 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -33,8 +33,6 @@ from bb.ui.crumbs.hobpages import HobPage
#
class ImageConfigurationPage (HobPage):
- __dummy_machine__ = "--select a machine--"
-
def __init__(self, builder):
super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
@@ -236,22 +234,18 @@ class ImageConfigurationPage (HobPage):
def machine_combo_changed_cb(self, machine_combo):
combo_item = machine_combo.get_active_text()
- if not combo_item or combo_item == self.__dummy_machine__:
- self.builder.configuration.curr_mach = ""
- self.builder.switch_page(self.builder.MACHINE_SELECTION)
- else:
- self.builder.configuration.curr_mach = combo_item
- # Do reparse recipes
- self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
+ self.builder.configuration.curr_mach = combo_item
+ # Do reparse recipes
+ self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
def update_machine_combo(self):
- all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
+ all_machines = self.builder.parameters.all_machines
model = self.machine_combo.get_model()
model.clear()
for machine in all_machines:
self.machine_combo.append_text(machine)
- self.machine_combo.set_active(0)
+ self.machine_combo.set_active(-1)
def switch_machine_combo(self):
model = self.machine_combo.get_model()
@@ -261,7 +255,7 @@ class ImageConfigurationPage (HobPage):
self.machine_combo.set_active(active)
return
active += 1
- self.machine_combo.set_active(0)
+ self.machine_combo.set_active(-1)
def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
self.builder.update_recipe_model(selected_image, selected_recipes)
@@ -302,7 +296,7 @@ class ImageConfigurationPage (HobPage):
# populate image combo
filter = {RecipeListModel.COL_TYPE : ['image']}
image_model = recipe_model.tree_model(filter)
- active = 0
+ active = -1
cnt = 0
it = image_model.get_iter_first()
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 06/11] Hob: Remove the indication in machine/base image combobox
2012-03-14 9:26 ` [PATCH 06/11] Hob: Remove the indication in machine/base image combobox Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Remove the "--select a machine--" prompt in machine selection.
> Also change "--select a base image--" to "Start from scratch" for
> base image selection.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Looks good.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/hoblistmodel.py | 2 +-
> lib/bb/ui/crumbs/imageconfigurationpage.py | 20 +++++++-------------
> 2 files changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index 0378828..c19aaa8 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -422,7 +422,7 @@ class RecipeListModel(gtk.ListStore):
> """
> (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11)
>
> - __dummy_image__ = "--select a base image--"
> + __dummy_image__ = "Start from scratch"
>
> __gsignals__ = {
> "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
> diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
> index f029bf8..3b1201e 100644
> --- a/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -33,8 +33,6 @@ from bb.ui.crumbs.hobpages import HobPage
> #
> class ImageConfigurationPage (HobPage):
>
> - __dummy_machine__ = "--select a machine--"
> -
> def __init__(self, builder):
> super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
>
> @@ -236,22 +234,18 @@ class ImageConfigurationPage (HobPage):
>
> def machine_combo_changed_cb(self, machine_combo):
> combo_item = machine_combo.get_active_text()
> - if not combo_item or combo_item == self.__dummy_machine__:
> - self.builder.configuration.curr_mach = ""
> - self.builder.switch_page(self.builder.MACHINE_SELECTION)
> - else:
> - self.builder.configuration.curr_mach = combo_item
> - # Do reparse recipes
> - self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
> + self.builder.configuration.curr_mach = combo_item
> + # Do reparse recipes
> + self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
>
> def update_machine_combo(self):
> - all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
> + all_machines = self.builder.parameters.all_machines
>
> model = self.machine_combo.get_model()
> model.clear()
> for machine in all_machines:
> self.machine_combo.append_text(machine)
> - self.machine_combo.set_active(0)
> + self.machine_combo.set_active(-1)
>
> def switch_machine_combo(self):
> model = self.machine_combo.get_model()
> @@ -261,7 +255,7 @@ class ImageConfigurationPage (HobPage):
> self.machine_combo.set_active(active)
> return
> active += 1
> - self.machine_combo.set_active(0)
> + self.machine_combo.set_active(-1)
>
> def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
> self.builder.update_recipe_model(selected_image, selected_recipes)
> @@ -302,7 +296,7 @@ class ImageConfigurationPage (HobPage):
> # populate image combo
> filter = {RecipeListModel.COL_TYPE : ['image']}
> image_model = recipe_model.tree_model(filter)
> - active = 0
> + active = -1
> cnt = 0
>
> it = image_model.get_iter_first()
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 07/11] Hob: Remove the recipe/package populated signal
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (5 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 06/11] Hob: Remove the indication in machine/base image combobox Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected Dongxiao Xu
` (3 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Handle the recipe and package list update in
handler_command_succeeded_cb(), which could avoid potential race
condition when doing recipe/package list updating and page switching.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 18 ++++++++----------
lib/bb/ui/crumbs/hoblistmodel.py | 14 --------------
2 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index f9844de..c6b1a3d 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -200,8 +200,6 @@ class Builder(gtk.Window):
self.connect("delete-event", self.destroy_window_cb)
self.recipe_model.connect ("recipe-selection-changed", self.recipelist_changed_cb)
self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
- self.recipe_model.connect ("recipelist-populated", self.recipelist_populated_cb)
- self.package_model.connect("packagelist-populated", self.packagelist_populated_cb)
self.handler.connect("config-updated", self.handler_config_updated_cb)
self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
self.handler.connect("layers-updated", self.handler_layers_updated_cb)
@@ -413,10 +411,14 @@ class Builder(gtk.Window):
self.handler.GENERATE_IMAGE]:
self.handler.request_package_info_async()
elif initcmd == self.handler.POPULATE_PACKAGEINFO:
+ if self.current_step == self.RCPPKGINFO_POPULATING:
+ self.switch_page(self.RCPPKGINFO_POPULATED)
+ self.rcppkglist_populated()
+ return
+
+ self.rcppkglist_populated()
if self.current_step == self.FAST_IMAGE_GENERATING:
self.switch_page(self.IMAGE_GENERATING)
- elif self.current_step == self.RCPPKGINFO_POPULATING:
- self.switch_page(self.RCPPKGINFO_POPULATED)
elif self.current_step == self.PACKAGE_GENERATING:
self.switch_page(self.PACKAGE_GENERATED)
elif self.current_step == self.IMAGE_GENERATING:
@@ -448,7 +450,7 @@ class Builder(gtk.Window):
def handler_data_generated_cb(self, handler):
self.window_sensitive(True)
- def recipelist_populated_cb(self, recipe_model):
+ def rcppkglist_populated(self):
selected_image = self.configuration.selected_image
selected_recipes = self.configuration.selected_recipes[:]
selected_packages = self.configuration.selected_packages[:]
@@ -458,11 +460,7 @@ class Builder(gtk.Window):
" ".join(selected_packages))
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
-
self.update_recipe_model(selected_image, selected_recipes)
-
- def packagelist_populated_cb(self, package_model):
- selected_packages = self.configuration.selected_packages[:]
self.update_package_model(selected_packages)
def recipelist_changed_cb(self, recipe_model):
@@ -825,7 +823,7 @@ class Builder(gtk.Window):
self.switch_page(self.RECIPE_SELECTION)
def initiate_new_build(self):
- self.configuration.curr_mach = ""
+ self.configuration.curr_mach = ""
self.image_configuration_page.switch_machine_combo()
self.switch_page(self.MACHINE_SELECTION)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index c19aaa8..edd61b5 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -36,9 +36,6 @@ class PackageListModel(gtk.TreeStore):
(COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11)
__gsignals__ = {
- "packagelist-populated" : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- ()),
"package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE,
()),
@@ -135,8 +132,6 @@ class PackageListModel(gtk.TreeStore):
"""
The populate() function takes as input the data from a
bb.event.PackageInfo event and populates the package list.
- Once the population is done it emits gsignal packagelist-populated
- to notify any listeners that the model is ready
"""
def populate(self, pkginfolist):
self.clear()
@@ -194,8 +189,6 @@ class PackageListModel(gtk.TreeStore):
self.COL_RPROV, rprov, self.COL_SIZE, size,
self.COL_BINB, "", self.COL_INC, False)
- self.emit("packagelist-populated")
-
"""
Check whether the item at item_path is included or not
"""
@@ -425,9 +418,6 @@ class RecipeListModel(gtk.ListStore):
__dummy_image__ = "Start from scratch"
__gsignals__ = {
- "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- ()),
"recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE,
()),
@@ -524,8 +514,6 @@ class RecipeListModel(gtk.ListStore):
"""
The populate() function takes as input the data from a
bb.event.TargetsTreeGenerated event and populates the RecipeList.
- Once the population is done it emits gsignal recipelist-populated
- to notify any listeners that the model is ready
"""
def populate(self, event_model):
# First clear the model, in case repopulating
@@ -580,8 +568,6 @@ class RecipeListModel(gtk.ListStore):
self.pn_path[pn] = path
it = self.iter_next(it)
- self.emit("recipelist-populated")
-
"""
Update the model, send out the notification.
"""
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 07/11] Hob: Remove the recipe/package populated signal
2012-03-14 9:26 ` [PATCH 07/11] Hob: Remove the recipe/package populated signal Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Handle the recipe and package list update in
> handler_command_succeeded_cb(), which could avoid potential race
> condition when doing recipe/package list updating and page switching.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
AFAICS this switches the GUI even if the model is not ready, which seems
like a reasonable change.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 18 ++++++++----------
> lib/bb/ui/crumbs/hoblistmodel.py | 14 --------------
> 2 files changed, 8 insertions(+), 24 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index f9844de..c6b1a3d 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -200,8 +200,6 @@ class Builder(gtk.Window):
> self.connect("delete-event", self.destroy_window_cb)
> self.recipe_model.connect ("recipe-selection-changed", self.recipelist_changed_cb)
> self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
> - self.recipe_model.connect ("recipelist-populated", self.recipelist_populated_cb)
> - self.package_model.connect("packagelist-populated", self.packagelist_populated_cb)
> self.handler.connect("config-updated", self.handler_config_updated_cb)
> self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
> self.handler.connect("layers-updated", self.handler_layers_updated_cb)
> @@ -413,10 +411,14 @@ class Builder(gtk.Window):
> self.handler.GENERATE_IMAGE]:
> self.handler.request_package_info_async()
> elif initcmd == self.handler.POPULATE_PACKAGEINFO:
> + if self.current_step == self.RCPPKGINFO_POPULATING:
> + self.switch_page(self.RCPPKGINFO_POPULATED)
> + self.rcppkglist_populated()
> + return
> +
> + self.rcppkglist_populated()
> if self.current_step == self.FAST_IMAGE_GENERATING:
> self.switch_page(self.IMAGE_GENERATING)
> - elif self.current_step == self.RCPPKGINFO_POPULATING:
> - self.switch_page(self.RCPPKGINFO_POPULATED)
> elif self.current_step == self.PACKAGE_GENERATING:
> self.switch_page(self.PACKAGE_GENERATED)
> elif self.current_step == self.IMAGE_GENERATING:
> @@ -448,7 +450,7 @@ class Builder(gtk.Window):
> def handler_data_generated_cb(self, handler):
> self.window_sensitive(True)
>
> - def recipelist_populated_cb(self, recipe_model):
> + def rcppkglist_populated(self):
> selected_image = self.configuration.selected_image
> selected_recipes = self.configuration.selected_recipes[:]
> selected_packages = self.configuration.selected_packages[:]
> @@ -458,11 +460,7 @@ class Builder(gtk.Window):
> " ".join(selected_packages))
>
> self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
> -
> self.update_recipe_model(selected_image, selected_recipes)
> -
> - def packagelist_populated_cb(self, package_model):
> - selected_packages = self.configuration.selected_packages[:]
> self.update_package_model(selected_packages)
>
> def recipelist_changed_cb(self, recipe_model):
> @@ -825,7 +823,7 @@ class Builder(gtk.Window):
> self.switch_page(self.RECIPE_SELECTION)
>
> def initiate_new_build(self):
> - self.configuration.curr_mach = ""
> + self.configuration.curr_mach = ""
> self.image_configuration_page.switch_machine_combo()
> self.switch_page(self.MACHINE_SELECTION)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index c19aaa8..edd61b5 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -36,9 +36,6 @@ class PackageListModel(gtk.TreeStore):
> (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11)
>
> __gsignals__ = {
> - "packagelist-populated" : (gobject.SIGNAL_RUN_LAST,
> - gobject.TYPE_NONE,
> - ()),
> "package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
> gobject.TYPE_NONE,
> ()),
> @@ -135,8 +132,6 @@ class PackageListModel(gtk.TreeStore):
> """
> The populate() function takes as input the data from a
> bb.event.PackageInfo event and populates the package list.
> - Once the population is done it emits gsignal packagelist-populated
> - to notify any listeners that the model is ready
> """
> def populate(self, pkginfolist):
> self.clear()
> @@ -194,8 +189,6 @@ class PackageListModel(gtk.TreeStore):
> self.COL_RPROV, rprov, self.COL_SIZE, size,
> self.COL_BINB, "", self.COL_INC, False)
>
> - self.emit("packagelist-populated")
> -
> """
> Check whether the item at item_path is included or not
> """
> @@ -425,9 +418,6 @@ class RecipeListModel(gtk.ListStore):
> __dummy_image__ = "Start from scratch"
>
> __gsignals__ = {
> - "recipelist-populated" : (gobject.SIGNAL_RUN_LAST,
> - gobject.TYPE_NONE,
> - ()),
> "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
> gobject.TYPE_NONE,
> ()),
> @@ -524,8 +514,6 @@ class RecipeListModel(gtk.ListStore):
> """
> The populate() function takes as input the data from a
> bb.event.TargetsTreeGenerated event and populates the RecipeList.
> - Once the population is done it emits gsignal recipelist-populated
> - to notify any listeners that the model is ready
> """
> def populate(self, event_model):
> # First clear the model, in case repopulating
> @@ -580,8 +568,6 @@ class RecipeListModel(gtk.ListStore):
> self.pn_path[pn] = path
> it = self.iter_next(it)
>
> - self.emit("recipelist-populated")
> -
> """
> Update the model, send out the notification.
> """
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (6 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 07/11] Hob: Remove the recipe/package populated signal Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None Dongxiao Xu
` (2 subsequent siblings)
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Only show recipe and package editing button after base image is selected.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 9 +++++++--
lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index c6b1a3d..f52b475 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -136,6 +136,7 @@ class Builder(gtk.Window):
LAYER_CHANGED,
RCPPKGINFO_POPULATING,
RCPPKGINFO_POPULATED,
+ BASEIMG_SELECTED,
RECIPE_SELECTION,
PACKAGE_GENERATING,
PACKAGE_GENERATED,
@@ -145,7 +146,7 @@ class Builder(gtk.Window):
IMAGE_GENERATED,
MY_IMAGE_OPENED,
BACK,
- END_NOOP) = range(14)
+ END_NOOP) = range(15)
(IMAGE_CONFIGURATION,
RECIPE_DETAILS,
@@ -159,6 +160,7 @@ class Builder(gtk.Window):
LAYER_CHANGED : IMAGE_CONFIGURATION,
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
+ BASEIMG_SELECTED : IMAGE_CONFIGURATION,
RECIPE_SELECTION : RECIPE_DETAILS,
PACKAGE_GENERATING : BUILD_DETAILS,
PACKAGE_GENERATED : PACKAGE_DETAILS,
@@ -309,6 +311,9 @@ class Builder(gtk.Window):
elif next_step == self.RCPPKGINFO_POPULATED:
self.image_configuration_page.show_info_populated()
+ elif next_step == self.BASEIMG_SELECTED:
+ self.image_configuration_page.show_baseimg_selected()
+
elif next_step == self.RECIPE_SELECTION:
pass
@@ -828,7 +833,7 @@ class Builder(gtk.Window):
self.switch_page(self.MACHINE_SELECTION)
def show_configuration(self):
- self.switch_page(self.RCPPKGINFO_POPULATED)
+ self.switch_page(self.BASEIMG_SELECTED)
def stop_build(self):
if self.stopping:
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index 3b1201e..f386281 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -109,9 +109,17 @@ class ImageConfigurationPage (HobPage):
def show_info_populated(self):
self.progress_bar.reset()
+ self._pack_components(pack_config_build_button = False)
+ self.set_config_machine_layout(show_progress_bar = False)
+ self.set_config_baseimg_layout()
+ self.show_all()
+
+ def show_baseimg_selected(self):
+ self.progress_bar.reset()
self._pack_components(pack_config_build_button = True)
self.set_config_machine_layout(show_progress_bar = False)
self.set_config_baseimg_layout()
+ self.set_rcppkg_layout()
self.show_all()
def create_config_machine(self):
@@ -196,9 +204,11 @@ class ImageConfigurationPage (HobPage):
self.gtable.attach(self.image_title_desc, 0, 40, 17, 22)
self.gtable.attach(self.image_combo, 0, 12, 22, 25)
self.gtable.attach(self.image_desc, 14, 38, 22, 27)
+ self.gtable.attach(self.image_separator, 0, 40, 35, 36)
+
+ def set_rcppkg_layout(self):
self.gtable.attach(self.view_recipes_button, 0, 20, 28, 32)
self.gtable.attach(self.view_packages_button, 20, 40, 28, 32)
- self.gtable.attach(self.image_separator, 0, 40, 35, 36)
def create_config_build_button(self):
# Create the "Build packages" and "Just bake" buttons at the bottom
@@ -280,6 +290,8 @@ class ImageConfigurationPage (HobPage):
self.builder.recipe_model.reset()
self.builder.package_model.reset()
+ self.show_baseimg_selected()
+
glib.idle_add(self.image_combo_changed_idle_cb, selected_image, selected_recipes, selected_packages)
def _image_combo_connect_signal(self):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected
2012-03-14 9:26 ` [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Only show recipe and package editing button after base image is selected.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 9 +++++++--
> lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++-
> 2 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index c6b1a3d..f52b475 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -136,6 +136,7 @@ class Builder(gtk.Window):
> LAYER_CHANGED,
> RCPPKGINFO_POPULATING,
> RCPPKGINFO_POPULATED,
> + BASEIMG_SELECTED,
> RECIPE_SELECTION,
> PACKAGE_GENERATING,
> PACKAGE_GENERATED,
> @@ -145,7 +146,7 @@ class Builder(gtk.Window):
> IMAGE_GENERATED,
> MY_IMAGE_OPENED,
> BACK,
> - END_NOOP) = range(14)
> + END_NOOP) = range(15)
>
> (IMAGE_CONFIGURATION,
> RECIPE_DETAILS,
> @@ -159,6 +160,7 @@ class Builder(gtk.Window):
> LAYER_CHANGED : IMAGE_CONFIGURATION,
> RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
> RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
> + BASEIMG_SELECTED : IMAGE_CONFIGURATION,
> RECIPE_SELECTION : RECIPE_DETAILS,
> PACKAGE_GENERATING : BUILD_DETAILS,
> PACKAGE_GENERATED : PACKAGE_DETAILS,
> @@ -309,6 +311,9 @@ class Builder(gtk.Window):
> elif next_step == self.RCPPKGINFO_POPULATED:
> self.image_configuration_page.show_info_populated()
>
> + elif next_step == self.BASEIMG_SELECTED:
> + self.image_configuration_page.show_baseimg_selected()
> +
> elif next_step == self.RECIPE_SELECTION:
> pass
>
> @@ -828,7 +833,7 @@ class Builder(gtk.Window):
> self.switch_page(self.MACHINE_SELECTION)
>
> def show_configuration(self):
> - self.switch_page(self.RCPPKGINFO_POPULATED)
> + self.switch_page(self.BASEIMG_SELECTED)
>
> def stop_build(self):
> if self.stopping:
> diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
> index 3b1201e..f386281 100644
> --- a/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -109,9 +109,17 @@ class ImageConfigurationPage (HobPage):
>
> def show_info_populated(self):
> self.progress_bar.reset()
> + self._pack_components(pack_config_build_button = False)
> + self.set_config_machine_layout(show_progress_bar = False)
> + self.set_config_baseimg_layout()
> + self.show_all()
> +
> + def show_baseimg_selected(self):
> + self.progress_bar.reset()
> self._pack_components(pack_config_build_button = True)
> self.set_config_machine_layout(show_progress_bar = False)
> self.set_config_baseimg_layout()
> + self.set_rcppkg_layout()
> self.show_all()
>
> def create_config_machine(self):
> @@ -196,9 +204,11 @@ class ImageConfigurationPage (HobPage):
> self.gtable.attach(self.image_title_desc, 0, 40, 17, 22)
> self.gtable.attach(self.image_combo, 0, 12, 22, 25)
> self.gtable.attach(self.image_desc, 14, 38, 22, 27)
> + self.gtable.attach(self.image_separator, 0, 40, 35, 36)
> +
> + def set_rcppkg_layout(self):
> self.gtable.attach(self.view_recipes_button, 0, 20, 28, 32)
> self.gtable.attach(self.view_packages_button, 20, 40, 28, 32)
> - self.gtable.attach(self.image_separator, 0, 40, 35, 36)
>
> def create_config_build_button(self):
> # Create the "Build packages" and "Just bake" buttons at the bottom
> @@ -280,6 +290,8 @@ class ImageConfigurationPage (HobPage):
> self.builder.recipe_model.reset()
> self.builder.package_model.reset()
>
> + self.show_baseimg_selected()
> +
> glib.idle_add(self.image_combo_changed_idle_cb, selected_image, selected_recipes, selected_packages)
>
> def _image_combo_connect_signal(self):
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (7 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 08/11] Hob: Show recipe/package editing button after base image is selected Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 10/11] Hob: Add stop button for parsing progress Dongxiao Xu
2012-03-14 9:26 ` [PATCH 11/11] Hob: improve recipe/package selection performance Dongxiao Xu
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 13 +++++++------
lib/bb/ui/crumbs/hobeventhandler.py | 5 ++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index f52b475..1363475 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -430,12 +430,13 @@ class Builder(gtk.Window):
self.switch_page(self.IMAGE_GENERATED)
def handler_command_failed_cb(self, handler, msg):
- lbl = "<b>Error</b>\n"
- lbl = lbl + "%s\n\n" % msg
- dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
- dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
- response = dialog.run()
- dialog.destroy()
+ if msg:
+ lbl = "<b>Error</b>\n"
+ lbl = lbl + "%s\n\n" % msg
+ dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+ dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
+ response = dialog.run()
+ dialog.destroy()
self.handler.clear_busy()
self.configuration.curr_mach = None
self.image_configuration_page.switch_machine_combo()
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 9c82bfe..cd25754 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -238,9 +238,8 @@ class HobHandler(gobject.GObject):
elif isinstance(event, bb.command.CommandFailed):
self.commands_async = []
- if self.error_msg:
- self.emit("command-failed", self.error_msg)
- self.error_msg = ""
+ self.emit("command-failed", self.error_msg)
+ self.error_msg = ""
elif isinstance(event, (bb.event.ParseStarted,
bb.event.CacheLoadStarted,
bb.event.TreeDataPreparationStarted,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None
2012-03-14 9:26 ` [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
0 siblings, 0 replies; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 13 +++++++------
> lib/bb/ui/crumbs/hobeventhandler.py | 5 ++---
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index f52b475..1363475 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -430,12 +430,13 @@ class Builder(gtk.Window):
> self.switch_page(self.IMAGE_GENERATED)
>
> def handler_command_failed_cb(self, handler, msg):
> - lbl = "<b>Error</b>\n"
> - lbl = lbl + "%s\n\n" % msg
> - dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
> - dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
> - response = dialog.run()
> - dialog.destroy()
> + if msg:
> + lbl = "<b>Error</b>\n"
> + lbl = lbl + "%s\n\n" % msg
> + dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
> + dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
> + response = dialog.run()
> + dialog.destroy()
> self.handler.clear_busy()
> self.configuration.curr_mach = None
> self.image_configuration_page.switch_machine_combo()
> diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
> index 9c82bfe..cd25754 100644
> --- a/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -238,9 +238,8 @@ class HobHandler(gobject.GObject):
>
> elif isinstance(event, bb.command.CommandFailed):
> self.commands_async = []
> - if self.error_msg:
> - self.emit("command-failed", self.error_msg)
> - self.error_msg = ""
> + self.emit("command-failed", self.error_msg)
> + self.error_msg = ""
> elif isinstance(event, (bb.event.ParseStarted,
> bb.event.CacheLoadStarted,
> bb.event.TreeDataPreparationStarted,
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 10/11] Hob: Add stop button for parsing progress
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (8 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 09/11] Hob: Emit command-failed signal even if error msg is None Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
2012-03-14 9:26 ` [PATCH 11/11] Hob: improve recipe/package selection performance Dongxiao Xu
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Add a Stop button to allow user to quit the parsing process.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 22 +++++++++++++++++++++-
lib/bb/ui/crumbs/hobeventhandler.py | 3 +++
lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++-
3 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 1363475..1d255ac 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -443,7 +443,20 @@ class Builder(gtk.Window):
self.switch_page(self.MACHINE_SELECTION)
def window_sensitive(self, sensitive):
- self.set_sensitive(sensitive)
+ self.image_configuration_page.machine_combo.set_sensitive(sensitive)
+ self.image_configuration_page.image_combo.set_sensitive(sensitive)
+ self.image_configuration_page.layer_button.set_sensitive(sensitive)
+ self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
+ self.image_configuration_page.toolbar.set_sensitive(sensitive)
+ self.image_configuration_page.view_recipes_button.set_sensitive(sensitive)
+ self.image_configuration_page.view_packages_button.set_sensitive(sensitive)
+ self.image_configuration_page.config_build_button.set_sensitive(sensitive)
+
+ self.recipe_details_page.set_sensitive(sensitive)
+ self.package_details_page.set_sensitive(sensitive)
+ self.build_details_page.set_sensitive(sensitive)
+ self.image_details_page.set_sensitive(sensitive)
+
if sensitive:
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
else:
@@ -482,6 +495,10 @@ class Builder(gtk.Window):
fraction = 0
if message["eventname"] == "TreeDataPreparationStarted":
fraction = 0.6 + fraction
+ self.image_configuration_page.stop_button.set_sensitive(False)
+ else:
+ self.image_configuration_page.stop_button.set_sensitive(True)
+
self.image_configuration_page.update_progress_bar(message["title"], fraction)
def handler_parsing_cb(self, handler, message):
@@ -836,6 +853,9 @@ class Builder(gtk.Window):
def show_configuration(self):
self.switch_page(self.BASEIMG_SELECTED)
+ def stop_parse(self):
+ self.handler.cancel_parse()
+
def stop_build(self):
if self.stopping:
lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index cd25754..790e2ef 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -371,6 +371,9 @@ class HobHandler(gobject.GObject):
self.commands_async = []
self.building = False
+ def cancel_parse(self):
+ self.server.runCommand(["stateStop"])
+
def cancel_build(self, force=False):
if force:
# Force the cooker to stop as quickly as possible
diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
index f386281..2af9054 100644
--- a/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -150,7 +150,13 @@ class ImageConfigurationPage (HobPage):
markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
self.layer_info_icon = HobInfoButton(markup, self.get_parent())
+ self.progress_box = gtk.HBox(False, 5)
self.progress_bar = HobProgressBar()
+ self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
+ self.stop_button = gtk.LinkButton("Stop the parsing process", "Stop")
+ self.stop_button.connect("clicked", self.stop_button_clicked_cb)
+ self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
+
self.machine_separator = gtk.HSeparator()
def set_config_machine_layout(self, show_progress_bar = False):
@@ -160,7 +166,7 @@ class ImageConfigurationPage (HobPage):
self.gtable.attach(self.layer_button, 12, 36, 6, 10)
self.gtable.attach(self.layer_info_icon, 36, 40, 6, 9)
if show_progress_bar == True:
- self.gtable.attach(self.progress_bar, 0, 40, 13, 17)
+ self.gtable.attach(self.progress_box, 0, 40, 13, 17)
self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
def create_config_baseimg(self):
@@ -242,8 +248,14 @@ class ImageConfigurationPage (HobPage):
return button_box
+ def stop_button_clicked_cb(self, button):
+ self.builder.stop_parse()
+
def machine_combo_changed_cb(self, machine_combo):
combo_item = machine_combo.get_active_text()
+ if not combo_item:
+ return
+
self.builder.configuration.curr_mach = combo_item
# Do reparse recipes
self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 10/11] Hob: Add stop button for parsing progress
2012-03-14 9:26 ` [PATCH 10/11] Hob: Add stop button for parsing progress Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
2012-03-15 0:44 ` Xu, Dongxiao
0 siblings, 1 reply; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Add a Stop button to allow user to quit the parsing process.
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
I'm upset to see using 5 for padding after having raised the issue so
many times... I don't think it's a good enough reason to bounce this
functionality when the padding is all over app-wide though.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/builder.py | 22 +++++++++++++++++++++-
> lib/bb/ui/crumbs/hobeventhandler.py | 3 +++
> lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++-
> 3 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> index 1363475..1d255ac 100755
> --- a/lib/bb/ui/crumbs/builder.py
> +++ b/lib/bb/ui/crumbs/builder.py
> @@ -443,7 +443,20 @@ class Builder(gtk.Window):
> self.switch_page(self.MACHINE_SELECTION)
>
> def window_sensitive(self, sensitive):
> - self.set_sensitive(sensitive)
> + self.image_configuration_page.machine_combo.set_sensitive(sensitive)
> + self.image_configuration_page.image_combo.set_sensitive(sensitive)
> + self.image_configuration_page.layer_button.set_sensitive(sensitive)
> + self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
> + self.image_configuration_page.toolbar.set_sensitive(sensitive)
> + self.image_configuration_page.view_recipes_button.set_sensitive(sensitive)
> + self.image_configuration_page.view_packages_button.set_sensitive(sensitive)
> + self.image_configuration_page.config_build_button.set_sensitive(sensitive)
> +
> + self.recipe_details_page.set_sensitive(sensitive)
> + self.package_details_page.set_sensitive(sensitive)
> + self.build_details_page.set_sensitive(sensitive)
> + self.image_details_page.set_sensitive(sensitive)
> +
> if sensitive:
> self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
> else:
> @@ -482,6 +495,10 @@ class Builder(gtk.Window):
> fraction = 0
> if message["eventname"] == "TreeDataPreparationStarted":
> fraction = 0.6 + fraction
> + self.image_configuration_page.stop_button.set_sensitive(False)
> + else:
> + self.image_configuration_page.stop_button.set_sensitive(True)
> +
> self.image_configuration_page.update_progress_bar(message["title"], fraction)
>
> def handler_parsing_cb(self, handler, message):
> @@ -836,6 +853,9 @@ class Builder(gtk.Window):
> def show_configuration(self):
> self.switch_page(self.BASEIMG_SELECTED)
>
> + def stop_parse(self):
> + self.handler.cancel_parse()
> +
> def stop_build(self):
> if self.stopping:
> lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
> diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
> index cd25754..790e2ef 100644
> --- a/lib/bb/ui/crumbs/hobeventhandler.py
> +++ b/lib/bb/ui/crumbs/hobeventhandler.py
> @@ -371,6 +371,9 @@ class HobHandler(gobject.GObject):
> self.commands_async = []
> self.building = False
>
> + def cancel_parse(self):
> + self.server.runCommand(["stateStop"])
> +
> def cancel_build(self, force=False):
> if force:
> # Force the cooker to stop as quickly as possible
> diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
> index f386281..2af9054 100644
> --- a/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -150,7 +150,13 @@ class ImageConfigurationPage (HobPage):
> markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
> self.layer_info_icon = HobInfoButton(markup, self.get_parent())
>
> + self.progress_box = gtk.HBox(False, 5)
> self.progress_bar = HobProgressBar()
> + self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
> + self.stop_button = gtk.LinkButton("Stop the parsing process", "Stop")
> + self.stop_button.connect("clicked", self.stop_button_clicked_cb)
> + self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
> +
> self.machine_separator = gtk.HSeparator()
>
> def set_config_machine_layout(self, show_progress_bar = False):
> @@ -160,7 +166,7 @@ class ImageConfigurationPage (HobPage):
> self.gtable.attach(self.layer_button, 12, 36, 6, 10)
> self.gtable.attach(self.layer_info_icon, 36, 40, 6, 9)
> if show_progress_bar == True:
> - self.gtable.attach(self.progress_bar, 0, 40, 13, 17)
> + self.gtable.attach(self.progress_box, 0, 40, 13, 17)
> self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
>
> def create_config_baseimg(self):
> @@ -242,8 +248,14 @@ class ImageConfigurationPage (HobPage):
>
> return button_box
>
> + def stop_button_clicked_cb(self, button):
> + self.builder.stop_parse()
> +
> def machine_combo_changed_cb(self, machine_combo):
> combo_item = machine_combo.get_active_text()
> + if not combo_item:
> + return
> +
> self.builder.configuration.curr_mach = combo_item
> # Do reparse recipes
> self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 10/11] Hob: Add stop button for parsing progress
2012-03-14 19:37 ` Joshua Lock
@ 2012-03-15 0:44 ` Xu, Dongxiao
0 siblings, 0 replies; 29+ messages in thread
From: Xu, Dongxiao @ 2012-03-15 0:44 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>
> On 14/03/12 02:26, Dongxiao Xu wrote:
> > Add a Stop button to allow user to quit the parsing process.
> >
> > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
>
> I'm upset to see using 5 for padding after having raised the issue so
> many times... I don't think it's a good enough reason to bounce this
> functionality when the padding is all over app-wide though.
Sorry for this change...
I just simply copied another piece of code in builddetailspage and
didn't care the padding value.
I will modify both of these values to 6.
Thanks,
Dongxiao
>
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
>
> > ---
> > lib/bb/ui/crumbs/builder.py | 22 +++++++++++++++++++++-
> > lib/bb/ui/crumbs/hobeventhandler.py | 3 +++
> > lib/bb/ui/crumbs/imageconfigurationpage.py | 14 +++++++++++++-
> > 3 files changed, 37 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
> > index 1363475..1d255ac 100755
> > --- a/lib/bb/ui/crumbs/builder.py
> > +++ b/lib/bb/ui/crumbs/builder.py
> > @@ -443,7 +443,20 @@ class Builder(gtk.Window):
> > self.switch_page(self.MACHINE_SELECTION)
> >
> > def window_sensitive(self, sensitive):
> > - self.set_sensitive(sensitive)
> > + self.image_configuration_page.machine_combo.set_sensitive(sensitive)
> > + self.image_configuration_page.image_combo.set_sensitive(sensitive)
> > + self.image_configuration_page.layer_button.set_sensitive(sensitive)
> > + self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
> > + self.image_configuration_page.toolbar.set_sensitive(sensitive)
> > + self.image_configuration_page.view_recipes_button.set_sensitive(sensitive)
> > + self.image_configuration_page.view_packages_button.set_sensitive(sensitive)
> > + self.image_configuration_page.config_build_button.set_sensitive(sensitive)
> > +
> > + self.recipe_details_page.set_sensitive(sensitive)
> > + self.package_details_page.set_sensitive(sensitive)
> > + self.build_details_page.set_sensitive(sensitive)
> > + self.image_details_page.set_sensitive(sensitive)
> > +
> > if sensitive:
> > self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
> > else:
> > @@ -482,6 +495,10 @@ class Builder(gtk.Window):
> > fraction = 0
> > if message["eventname"] == "TreeDataPreparationStarted":
> > fraction = 0.6 + fraction
> > + self.image_configuration_page.stop_button.set_sensitive(False)
> > + else:
> > + self.image_configuration_page.stop_button.set_sensitive(True)
> > +
> > self.image_configuration_page.update_progress_bar(message["title"], fraction)
> >
> > def handler_parsing_cb(self, handler, message):
> > @@ -836,6 +853,9 @@ class Builder(gtk.Window):
> > def show_configuration(self):
> > self.switch_page(self.BASEIMG_SELECTED)
> >
> > + def stop_parse(self):
> > + self.handler.cancel_parse()
> > +
> > def stop_build(self):
> > if self.stopping:
> > lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
> > diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
> > index cd25754..790e2ef 100644
> > --- a/lib/bb/ui/crumbs/hobeventhandler.py
> > +++ b/lib/bb/ui/crumbs/hobeventhandler.py
> > @@ -371,6 +371,9 @@ class HobHandler(gobject.GObject):
> > self.commands_async = []
> > self.building = False
> >
> > + def cancel_parse(self):
> > + self.server.runCommand(["stateStop"])
> > +
> > def cancel_build(self, force=False):
> > if force:
> > # Force the cooker to stop as quickly as possible
> > diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py
> > index f386281..2af9054 100644
> > --- a/lib/bb/ui/crumbs/imageconfigurationpage.py
> > +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py
> > @@ -150,7 +150,13 @@ class ImageConfigurationPage (HobPage):
> > markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
> > self.layer_info_icon = HobInfoButton(markup, self.get_parent())
> >
> > + self.progress_box = gtk.HBox(False, 5)
> > self.progress_bar = HobProgressBar()
> > + self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
> > + self.stop_button = gtk.LinkButton("Stop the parsing process", "Stop")
> > + self.stop_button.connect("clicked", self.stop_button_clicked_cb)
> > + self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
> > +
> > self.machine_separator = gtk.HSeparator()
> >
> > def set_config_machine_layout(self, show_progress_bar = False):
> > @@ -160,7 +166,7 @@ class ImageConfigurationPage (HobPage):
> > self.gtable.attach(self.layer_button, 12, 36, 6, 10)
> > self.gtable.attach(self.layer_info_icon, 36, 40, 6, 9)
> > if show_progress_bar == True:
> > - self.gtable.attach(self.progress_bar, 0, 40, 13, 17)
> > + self.gtable.attach(self.progress_box, 0, 40, 13, 17)
> > self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
> >
> > def create_config_baseimg(self):
> > @@ -242,8 +248,14 @@ class ImageConfigurationPage (HobPage):
> >
> > return button_box
> >
> > + def stop_button_clicked_cb(self, button):
> > + self.builder.stop_parse()
> > +
> > def machine_combo_changed_cb(self, machine_combo):
> > combo_item = machine_combo.get_active_text()
> > + if not combo_item:
> > + return
> > +
> > self.builder.configuration.curr_mach = combo_item
> > # Do reparse recipes
> > self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
>
^ permalink raw reply [flat|nested] 29+ messages in thread
* [PATCH 11/11] Hob: improve recipe/package selection performance
2012-03-14 9:26 [PATCH 00/11][PULL] Hob: Functionality and GUI fixes Dongxiao Xu
` (9 preceding siblings ...)
2012-03-14 9:26 ` [PATCH 10/11] Hob: Add stop button for parsing progress Dongxiao Xu
@ 2012-03-14 9:26 ` Dongxiao Xu
2012-03-14 19:37 ` Joshua Lock
10 siblings, 1 reply; 29+ messages in thread
From: Dongxiao Xu @ 2012-03-14 9:26 UTC (permalink / raw)
To: bitbake-devel
Originally we will send selection chagned notification in each
include_item and exclude_item, which is time cost since these are
recursive functions and we may select hundreds of recipes/packages.
The improvement is to move the notification from include_item and
exclude_item to the place where the two functions are called.
This could greatly improve the selection/deselection speed for recipe
and package lists.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hoblistmodel.py | 10 +++-------
lib/bb/ui/crumbs/packageselectionpage.py | 1 +
lib/bb/ui/crumbs/recipeselectionpage.py | 1 +
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
index edd61b5..caf31bc 100644
--- a/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/lib/bb/ui/crumbs/hoblistmodel.py
@@ -216,8 +216,6 @@ class PackageListModel(gtk.TreeStore):
self[item_path][self.COL_INC] = True
- self.selection_change_notification()
-
it = self.get_iter(item_path)
# If user explicitly selects a recipe, all its providing packages are selected.
@@ -276,8 +274,6 @@ class PackageListModel(gtk.TreeStore):
self[item_path][self.COL_INC] = False
- self.selection_change_notification()
-
item_name = self[item_path][self.COL_NAME]
item_rdep = self[item_path][self.COL_RDEP]
it = self.get_iter(item_path)
@@ -343,6 +339,7 @@ class PackageListModel(gtk.TreeStore):
else:
left.append(pn)
+ self.selection_change_notification()
return left
def get_selected_packages(self):
@@ -604,7 +601,6 @@ class RecipeListModel(gtk.ListStore):
item_deps = self[item_path][self.COL_DEPS]
self[item_path][self.COL_INC] = True
- self.selection_change_notification()
item_bin = self[item_path][self.COL_BINB].split(', ')
if binb and not binb in item_bin:
@@ -642,8 +638,6 @@ class RecipeListModel(gtk.ListStore):
self[item_path][self.COL_INC] = False
- self.selection_change_notification()
-
item_name = self[item_path][self.COL_NAME]
item_deps = self[item_path][self.COL_DEPS]
if item_deps:
@@ -703,6 +697,7 @@ class RecipeListModel(gtk.ListStore):
path = self.pn_path[pn]
self.include_item(item_path=path,
binb="User Selected")
+ self.selection_change_notification()
def get_selected_image(self):
it = self.get_iter_first()
@@ -724,3 +719,4 @@ class RecipeListModel(gtk.ListStore):
self.include_item(item_path=path,
binb="User Selected",
image_contents=True)
+ self.selection_change_notification()
diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
index 0427fe2..4fb199e 100755
--- a/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/lib/bb/ui/crumbs/packageselectionpage.py
@@ -206,6 +206,7 @@ class PackageSelectionPage (HobPage):
else:
self.package_model.exclude_item(item_path=path)
+ self.refresh_selection()
self.builder.window_sensitive(True)
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index 234734c..50d4363 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -202,6 +202,7 @@ class RecipeSelectionPage (HobPage):
else:
self.recipe_model.exclude_item(item_path=path)
+ self.refresh_selection()
self.builder.window_sensitive(True)
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 29+ messages in thread* Re: [PATCH 11/11] Hob: improve recipe/package selection performance
2012-03-14 9:26 ` [PATCH 11/11] Hob: improve recipe/package selection performance Dongxiao Xu
@ 2012-03-14 19:37 ` Joshua Lock
2012-03-14 23:54 ` Xu, Dongxiao
0 siblings, 1 reply; 29+ messages in thread
From: Joshua Lock @ 2012-03-14 19:37 UTC (permalink / raw)
To: bitbake-devel
On 14/03/12 02:26, Dongxiao Xu wrote:
> Originally we will send selection chagned notification in each
> include_item and exclude_item, which is time cost since these are
> recursive functions and we may select hundreds of recipes/packages.
>
> The improvement is to move the notification from include_item and
> exclude_item to the place where the two functions are called.
> This could greatly improve the selection/deselection speed for recipe
> and package lists.
Awesome! So instead of sending the change notification for each
included/excluded item with this change the signal will be sent once
when a set of changes are made. Right?
>
> Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/ui/crumbs/hoblistmodel.py | 10 +++-------
> lib/bb/ui/crumbs/packageselectionpage.py | 1 +
> lib/bb/ui/crumbs/recipeselectionpage.py | 1 +
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> index edd61b5..caf31bc 100644
> --- a/lib/bb/ui/crumbs/hoblistmodel.py
> +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> @@ -216,8 +216,6 @@ class PackageListModel(gtk.TreeStore):
>
> self[item_path][self.COL_INC] = True
>
> - self.selection_change_notification()
> -
> it = self.get_iter(item_path)
>
> # If user explicitly selects a recipe, all its providing packages are selected.
> @@ -276,8 +274,6 @@ class PackageListModel(gtk.TreeStore):
>
> self[item_path][self.COL_INC] = False
>
> - self.selection_change_notification()
> -
> item_name = self[item_path][self.COL_NAME]
> item_rdep = self[item_path][self.COL_RDEP]
> it = self.get_iter(item_path)
> @@ -343,6 +339,7 @@ class PackageListModel(gtk.TreeStore):
> else:
> left.append(pn)
>
> + self.selection_change_notification()
> return left
>
> def get_selected_packages(self):
> @@ -604,7 +601,6 @@ class RecipeListModel(gtk.ListStore):
> item_deps = self[item_path][self.COL_DEPS]
>
> self[item_path][self.COL_INC] = True
> - self.selection_change_notification()
>
> item_bin = self[item_path][self.COL_BINB].split(', ')
> if binb and not binb in item_bin:
> @@ -642,8 +638,6 @@ class RecipeListModel(gtk.ListStore):
>
> self[item_path][self.COL_INC] = False
>
> - self.selection_change_notification()
> -
> item_name = self[item_path][self.COL_NAME]
> item_deps = self[item_path][self.COL_DEPS]
> if item_deps:
> @@ -703,6 +697,7 @@ class RecipeListModel(gtk.ListStore):
> path = self.pn_path[pn]
> self.include_item(item_path=path,
> binb="User Selected")
> + self.selection_change_notification()
>
> def get_selected_image(self):
> it = self.get_iter_first()
> @@ -724,3 +719,4 @@ class RecipeListModel(gtk.ListStore):
> self.include_item(item_path=path,
> binb="User Selected",
> image_contents=True)
> + self.selection_change_notification()
> diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
> index 0427fe2..4fb199e 100755
> --- a/lib/bb/ui/crumbs/packageselectionpage.py
> +++ b/lib/bb/ui/crumbs/packageselectionpage.py
> @@ -206,6 +206,7 @@ class PackageSelectionPage (HobPage):
> else:
> self.package_model.exclude_item(item_path=path)
>
> + self.refresh_selection()
> self.builder.window_sensitive(True)
>
> def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
> diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> index 234734c..50d4363 100755
> --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> @@ -202,6 +202,7 @@ class RecipeSelectionPage (HobPage):
> else:
> self.recipe_model.exclude_item(item_path=path)
>
> + self.refresh_selection()
> self.builder.window_sensitive(True)
>
> def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
--
Joshua '贾詡' Lock
Yocto Project "Johannes factotum"
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 29+ messages in thread* Re: [PATCH 11/11] Hob: improve recipe/package selection performance
2012-03-14 19:37 ` Joshua Lock
@ 2012-03-14 23:54 ` Xu, Dongxiao
0 siblings, 0 replies; 29+ messages in thread
From: Xu, Dongxiao @ 2012-03-14 23:54 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Wed, 2012-03-14 at 12:37 -0700, Joshua Lock wrote:
>
> On 14/03/12 02:26, Dongxiao Xu wrote:
> > Originally we will send selection chagned notification in each
> > include_item and exclude_item, which is time cost since these are
> > recursive functions and we may select hundreds of recipes/packages.
> >
> > The improvement is to move the notification from include_item and
> > exclude_item to the place where the two functions are called.
> > This could greatly improve the selection/deselection speed for recipe
> > and package lists.
>
> Awesome! So instead of sending the change notification for each
> included/excluded item with this change the signal will be sent once
> when a set of changes are made. Right?
Yes, you are right. Now the signal only emits once where a bunch of
changes happen.
Thanks,
Dongxiao
>
> >
> > Signed-off-by: Dongxiao Xu<dongxiao.xu@intel.com>
>
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
>
> > ---
> > lib/bb/ui/crumbs/hoblistmodel.py | 10 +++-------
> > lib/bb/ui/crumbs/packageselectionpage.py | 1 +
> > lib/bb/ui/crumbs/recipeselectionpage.py | 1 +
> > 3 files changed, 5 insertions(+), 7 deletions(-)
> >
> > diff --git a/lib/bb/ui/crumbs/hoblistmodel.py b/lib/bb/ui/crumbs/hoblistmodel.py
> > index edd61b5..caf31bc 100644
> > --- a/lib/bb/ui/crumbs/hoblistmodel.py
> > +++ b/lib/bb/ui/crumbs/hoblistmodel.py
> > @@ -216,8 +216,6 @@ class PackageListModel(gtk.TreeStore):
> >
> > self[item_path][self.COL_INC] = True
> >
> > - self.selection_change_notification()
> > -
> > it = self.get_iter(item_path)
> >
> > # If user explicitly selects a recipe, all its providing packages are selected.
> > @@ -276,8 +274,6 @@ class PackageListModel(gtk.TreeStore):
> >
> > self[item_path][self.COL_INC] = False
> >
> > - self.selection_change_notification()
> > -
> > item_name = self[item_path][self.COL_NAME]
> > item_rdep = self[item_path][self.COL_RDEP]
> > it = self.get_iter(item_path)
> > @@ -343,6 +339,7 @@ class PackageListModel(gtk.TreeStore):
> > else:
> > left.append(pn)
> >
> > + self.selection_change_notification()
> > return left
> >
> > def get_selected_packages(self):
> > @@ -604,7 +601,6 @@ class RecipeListModel(gtk.ListStore):
> > item_deps = self[item_path][self.COL_DEPS]
> >
> > self[item_path][self.COL_INC] = True
> > - self.selection_change_notification()
> >
> > item_bin = self[item_path][self.COL_BINB].split(', ')
> > if binb and not binb in item_bin:
> > @@ -642,8 +638,6 @@ class RecipeListModel(gtk.ListStore):
> >
> > self[item_path][self.COL_INC] = False
> >
> > - self.selection_change_notification()
> > -
> > item_name = self[item_path][self.COL_NAME]
> > item_deps = self[item_path][self.COL_DEPS]
> > if item_deps:
> > @@ -703,6 +697,7 @@ class RecipeListModel(gtk.ListStore):
> > path = self.pn_path[pn]
> > self.include_item(item_path=path,
> > binb="User Selected")
> > + self.selection_change_notification()
> >
> > def get_selected_image(self):
> > it = self.get_iter_first()
> > @@ -724,3 +719,4 @@ class RecipeListModel(gtk.ListStore):
> > self.include_item(item_path=path,
> > binb="User Selected",
> > image_contents=True)
> > + self.selection_change_notification()
> > diff --git a/lib/bb/ui/crumbs/packageselectionpage.py b/lib/bb/ui/crumbs/packageselectionpage.py
> > index 0427fe2..4fb199e 100755
> > --- a/lib/bb/ui/crumbs/packageselectionpage.py
> > +++ b/lib/bb/ui/crumbs/packageselectionpage.py
> > @@ -206,6 +206,7 @@ class PackageSelectionPage (HobPage):
> > else:
> > self.package_model.exclude_item(item_path=path)
> >
> > + self.refresh_selection()
> > self.builder.window_sensitive(True)
> >
> > def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
> > diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> > index 234734c..50d4363 100755
> > --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> > +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> > @@ -202,6 +202,7 @@ class RecipeSelectionPage (HobPage):
> > else:
> > self.recipe_model.exclude_item(item_path=path)
> >
> > + self.refresh_selection()
> > self.builder.window_sensitive(True)
> >
> > def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
>
^ permalink raw reply [flat|nested] 29+ messages in thread