[bitbake-devel] [PATCH] [HOB] replace tooltips with property windows

Richard Purdie richard.purdie at linuxfoundation.org
Mon Mar 4 14:17:24 UTC 2013


On Fri, 2013-02-22 at 13:12 +0200, Andrei Dinu wrote:
> Yocto Bug #2248
> 
>  - extended cache_extra.py with the extra information needed in the
>  property windows.
>  - extended cooker.py so that the extra information in cache_extra.py could
>  be used.
>  - replaced in the builder.py the function that displayed the tooltips
>  with two functions that display property windows for recipes and packages
>  pages.
>  - advancedsettingsdialog.py : added information so that it would display
>  correctly in the information dialogs.
>  - propertydialog.py : new class aded for the property windows.
>    this covers functionality for : recipe selection page
>                                    package selection page
>                                    information dialogs
>  - simplesettingsdialog.py : added information so that it would display
>  correctly in the information dialogs.
>  - hoblistmodel.py : added information columns needed in order to display
>  the information in the property dialogs.
>  - hobwidget.py : added functionality for the information dialogs.
>  - imageconfigurationpage.py : added information so that it would display
>  correctly in the information dialogs.
>  - packageselectionpage.py : added event for the "All packages" tab and
>  passing the information needed to the function created in the builder.
>  - recipeselectionpage.py : added events for the "Package Groups" and "All
>  recipes" tabs and passing the information needed to the function created
>  in the builder.

Firstly, this is way too many changes in one patch. Please split them
out into a logical series. There is also a problem, I think, see below.

> Signed-off-by: Andrei Dinu <andrei.adrianx.dinu at intel.com>
> ---
>  bitbake/lib/bb/cache_extra.py                      |    9 +
>  bitbake/lib/bb/cooker.py                           |    6 +
>  bitbake/lib/bb/ui/crumbs/builder.py                |   36 +-
>  .../lib/bb/ui/crumbs/hig/advancedsettingsdialog.py |   12 +-
>  bitbake/lib/bb/ui/crumbs/hig/propertydialog.py     |  347 ++++++++++++++++++++
>  .../lib/bb/ui/crumbs/hig/simplesettingsdialog.py   |   14 +-
>  bitbake/lib/bb/ui/crumbs/hoblistmodel.py           |   23 +-
>  bitbake/lib/bb/ui/crumbs/hobwidget.py              |   26 +-
>  bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    2 +-
>  bitbake/lib/bb/ui/crumbs/packageselectionpage.py   |   13 +-
>  bitbake/lib/bb/ui/crumbs/recipeselectionpage.py    |   21 +-
>  11 files changed, 473 insertions(+), 36 deletions(-)
>  create mode 100644 bitbake/lib/bb/ui/crumbs/hig/propertydialog.py
> 
> diff --git a/bitbake/lib/bb/cache_extra.py b/bitbake/lib/bb/cache_extra.py
> index 40ba304..bf02bb7 100644
> --- a/bitbake/lib/bb/cache_extra.py
> +++ b/bitbake/lib/bb/cache_extra.py
> @@ -41,6 +41,9 @@ class HobRecipeInfo(RecipeInfoCommon):
>          self.license = self.getvar('LICENSE', metadata)
>          self.section = self.getvar('SECTION', metadata)
>          self.description = self.getvar('DESCRIPTION', metadata)
> +        self.homepage = self.getvar('HOMEPAGE', metadata)
> +        self.bugtracker = self.getvar('BUGTRACKER', metadata)
> +        self.prevision = self.getvar('PR', metadata)
>  
>      @classmethod
>      def init_cacheData(cls, cachedata):
> @@ -49,9 +52,15 @@ class HobRecipeInfo(RecipeInfoCommon):
>          cachedata.license = {}
>          cachedata.section = {}
>          cachedata.description = {}
> +        cachedata.homepage = {}
> +        cachedata.bugtracker = {}
> +        cachedata.prevision = {}
>  
>      def add_cacheData(self, cachedata, fn):
>          cachedata.summary[fn] = self.summary
>          cachedata.license[fn] = self.license
>          cachedata.section[fn] = self.section
>          cachedata.description[fn] = self.description
> +        cachedata.homepage[fn] = self.homepage
> +        cachedata.bugtracker[fn] = self.bugtracker
> +        cachedata.prevision[fn] = self.prevision


The above is all good, you're adding the data to an extra cache.

> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index f70a04f..f23eed0 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -571,8 +571,11 @@ class BBCooker:
>              lic = self.status.license[fn]
>              section = self.status.section[fn]
>              description = self.status.description[fn]
> +            homepage = self.status.homepage[fn]
> +            bugtracker = self.status.bugtracker[fn]
>              rdepends = self.status.rundeps[fn]
>              rrecs = self.status.runrecs[fn]
> +            prevision = self.status.prevision[fn]
>              inherits = self.status.inherits.get(fn, None)
>              if pn not in depend_tree["pn"]:
>                  depend_tree["pn"][pn] = {}
> @@ -583,6 +586,9 @@ class BBCooker:
>                  depend_tree["pn"][pn]["section"] = section
>                  depend_tree["pn"][pn]["description"] = description
>                  depend_tree["pn"][pn]["inherits"] = inherits
> +                depend_tree["pn"][pn]["homepage"] = homepage
> +                depend_tree["pn"][pn]["bugtracker"] = bugtracker
> +                depend_tree["pn"][pn]["revision"] = prevision
>  
>              if fnid not in seen_fnids:
>                  seen_fnids.append(fnid)

However in this function, you're assuming the extra cache is available.
I think this assumption has already been made by the code since
summary/homepage/description/license are in the extra cache too. Its not
documented however.

Can you please document that this function requires the extra cache to
be enabled?

Thanks,

Richard





More information about the bitbake-devel mailing list