diff options
author | David Reyna <David.Reyna@windriver.com> | 2014-04-08 16:25:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-09 16:59:14 +0100 |
commit | fd57128dc3a35ca87031f3df1a531a085e89baf0 (patch) | |
tree | 03fbf2283488aa903381d63867948d2b61aca3b3 /lib/toaster/toastergui/views.py | |
parent | 845b081fc108c656f04d4a70afa4695defc13c9f (diff) | |
download | bitbake-fd57128dc3a35ca87031f3df1a531a085e89baf0.tar.gz |
toaster: regex alternation filter caused django error
The combination of a regex filter specification that uses alternate,
plus a search string, plus multiple search_allowed_fields, leads to
a Django fatal error. Replace this regex filter for variables in
local files with a simpler 'contains' against the project's directory
plus a '/conf/' string.
Alex rebased this on top of fix for #6048.
[YOCTO #5962]
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastergui/views.py')
-rw-r--r-- | lib/toaster/toastergui/views.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py index 4ed99400c..78726a88b 100644 --- a/lib/toaster/toastergui/views.py +++ b/lib/toaster/toastergui/views.py @@ -1154,17 +1154,17 @@ def configvars(request, build_id): variables = _build_page_range(Paginator(queryset, request.GET.get('count', 50)), request.GET.get('page', 1)) + # show all matching files (not just the last one) file_filter= search_term + ":" - if filter_string.find('conf/local.conf') > 0: - file_filter += 'conf/local.conf' - if filter_string.find('conf/bblayers.conf') > 0: - file_filter += 'conf/bblayers.conf' + if filter_string.find('/conf/') > 0: + file_filter += 'conf/(local|bblayers).conf' if filter_string.find('conf/machine/') > 0: file_filter += 'conf/machine/' if filter_string.find('conf/distro/') > 0: file_filter += 'conf/distro/' if filter_string.find('/bitbake.conf') > 0: file_filter += '/bitbake.conf' + build_dir=re.sub("/tmp/log/.*","",Build.objects.filter(pk=build_id)[0].cooker_log_path) context = { 'objectname': 'configvars', @@ -1193,7 +1193,7 @@ def configvars(request, build_id): 'class' : 'vhistory__file_name', 'label': 'Show:', 'options' : [ - ('Local configuration variables', 'vhistory__file_name__regex:conf/(local|bblayers).conf', queryset_with_search.filter(vhistory__file_name__regex='conf/(local|bblayers).conf').count(), 'Select this filter to see variables set by the <code>local.conf</code> and <code>bblayers.conf</code> configuration files inside the <code>/build/conf/</code> directory'), + ('Local configuration variables', 'vhistory__file_name__contains:'+build_dir+'/conf/',queryset_with_search.filter(vhistory__file_name__contains=build_dir+'/conf/').count(), 'Select this filter to see variables set by the <code>local.conf</code> and <code>bblayers.conf</code> configuration files inside the <code>/build/conf/</code> directory'), ('Machine configuration variables', 'vhistory__file_name__contains:conf/machine/',queryset_with_search.filter(vhistory__file_name__contains='conf/machine').count(), 'Select this filter to see variables set by the configuration file(s) inside your layers <code>/conf/machine/</code> directory'), ('Distro configuration variables', 'vhistory__file_name__contains:conf/distro/',queryset_with_search.filter(vhistory__file_name__contains='conf/distro').count(), 'Select this filter to see variables set by the configuration file(s) inside your layers <code>/conf/distro/</code> directory'), ('Layer configuration variables', 'vhistory__file_name__contains:conf/layer.conf',queryset_with_search.filter(vhistory__file_name__contains='conf/layer.conf').count(), 'Select this filter to see variables set by the <code>layer.conf</code> configuration file inside your layers'), |