[bitbake-devel] [PATCH 1/6] bitbake: toastergui: Toastertables don't replace dash in cache key

Alex DAMIAN alexandru.damian at intel.com
Tue Jul 28 14:24:40 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

The dash character was being stripped from the cache key when we sanitise
it for the memcache backend. This meant that we were getting a false hit
on the cache and returning non descending results which are indicated by
the dash prefix on the field name.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 lib/toaster/toastergui/widgets.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/widgets.py b/lib/toaster/toastergui/widgets.py
index 5f6b47b..0885402 100644
--- a/lib/toaster/toastergui/widgets.py
+++ b/lib/toaster/toastergui/widgets.py
@@ -252,8 +252,8 @@ class ToasterTable(TemplateView):
         for key, val in kwargs.iteritems():
             cache_name = cache_name + str(key) + str(val)
 
-        # No special chars allowed in the cache name
-        cache_name = re.sub(r'[^A-Za-z0-9]', "", cache_name)
+        # No special chars allowed in the cache name apart from dash
+        cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name)
         data = cache.get(cache_name)
 
         if data:
-- 
1.9.1




More information about the bitbake-devel mailing list