Skip to contentSkip to conversation

bitbake: add description cache into cache_extra

PATCH Superseded Shane Wang 2 participants 3 messages Jan 20, 2012 – Jan 27, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Shane Wang

author
#0 lore raw

cover bitbake: add description cache into cache_extra

enable bitbake to cache description into the extra cache file and Hob2 will get its value for core-image-foo.

The following changes since commit 522c6b376d067243bff20c64a1f6f8700be8e586:

gnutls: Fix configure issue wrt to rm (2012-01-19 11:34:13 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib shane/desc-bitbake-change
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=shane/desc-bitbake-change

Shane Wang (1):
bitbake: add description cache into cache_extra

 bitbake/lib/bb/cache_extra.py |   13 +++----------
 bitbake/lib/bb/cooker.py      |    2 ++
 2 files changed, 5 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.6
author
#1 lore raw

PATCH 1/1 bitbake: add description cache into cache_extra

enable bitbake to cache description into the extra cache file and Hob2 will get its value for core-image-foo.

---
 bitbake/lib/bb/cache_extra.py |   13 +++----------
 bitbake/lib/bb/cooker.py      |    2 ++
 2 files changed, 5 insertions(+), 10 deletions(-)
bitbake/lib/bb/cache_extra.py +3 -10
index 4c8841f..723b97f 100644
@@ -36,19 +36,12 @@ class HobRecipeInfo(RecipeInfoCommon):
     cachefile = "bb_extracache_" + classname +".dat"        
 
     def __init__(self, filename, metadata):
-
-        self.summary = self.getvar('SUMMARY', metadata)
-        self.license = self.getvar('LICENSE', metadata)
-        self.section = self.getvar('SECTION', metadata)
+        self.description = self.getvar('DESCRIPTION', metadata)
 
     @classmethod
     def init_cacheData(cls, cachedata):
         # CacheData in Hob RecipeInfo Class
-        cachedata.summary = {}
-        cachedata.license = {}
-        cachedata.section = {}
+        cachedata.description = {}
 
     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
bitbake/lib/bb/cooker.py +2 -0
index 4197a02..cc5d190 100644
@@ -466,6 +466,7 @@ class BBCooker:
             summary = self.status.summary[fn]
             lic = self.status.license[fn]
             section = self.status.section[fn]
+            description = self.status.description[fn]
             if pn not in depend_tree["pn"]:
                 depend_tree["pn"][pn] = {}
                 depend_tree["pn"][pn]["filename"] = fn
@@ -473,6 +474,7 @@ class BBCooker:
                 depend_tree["pn"][pn]["summary"] = summary
                 depend_tree["pn"][pn]["license"] = lic
                 depend_tree["pn"][pn]["section"] = section
+                depend_tree["pn"][pn]["description"] = description
 
             if fnid not in seen_fnids:
                 seen_fnids.append(fnid)
Signature · 1 line
1.7.6
#2 lore raw
Quoted 25 lines · Shane Wang

enable bitbake to cache description into the extra cache file and Hob2 will get its value for core-image-foo.

---
 bitbake/lib/bb/cache_extra.py |   13 +++----------
 bitbake/lib/bb/cooker.py      |    2 ++
 2 files changed, 5 insertions(+), 10 deletions(-)
bitbake/lib/bb/cache_extra.py +1 -4
index 4c8841f..723b97f 100644
@@ -36,19 +36,12 @@ class HobRecipeInfo(RecipeInfoCommon):
     cachefile = "bb_extracache_" + classname +".dat"        
 
     def __init__(self, filename, metadata):
-
-        self.summary = self.getvar('SUMMARY', metadata)
-        self.license = self.getvar('LICENSE', metadata)
-        self.section = self.getvar('SECTION', metadata)
+        self.description = self.getvar('DESCRIPTION', metadata)
 
     @classmethod
     def init_cacheData(cls, cachedata):
         # CacheData in Hob RecipeInfo Class

bitbake/lib/bb/cache_extra.py class HobRecipeInfo(RecipeInfoCommon): · line 47

Quoted 10 lines
bitbake/lib/bb/cache_extra.py +2 -6
-        cachedata.summary = {}
-        cachedata.license = {}
-        cachedata.section = {}
+        cachedata.description = {}
 
     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

I think rather than remove the summary/license/section fromhere, we should remove them from the main cache. There were added there as a temporary measure before we had multiple cache support and we should remove them now since they're only used by the hob UI, just like description.

Cheers,

Richard