[yocto] [PATCH][layerindex-web] search: only match pn against search string for recipe searches

2016-03-19 Thread Elliot Smith
Using the search box creates a query against the pns,
summaries, descriptions and filenames of recipes.
This results in a lot of spurious results for common terms
like "git" when performing a recipe search.

Reduce the search fields used to just the pn so that the search
will only return results where the recipe name matches.

[YOCTO #9159]

Signed-off-by: Elliot Smith <elliot.sm...@intel.com>
---
 layerindex/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/layerindex/views.py b/layerindex/views.py
index 7e877ac..2dbde24 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -373,7 +373,7 @@ class RecipeSearchView(ListView):
 query_string = self.request.GET.get('q', '')
 init_qs = 
Recipe.objects.filter(layerbranch__branch__name=self.kwargs['branch'])
 if query_string.strip():
-entry_query = simplesearch.get_query(query_string, ['pn', 
'summary', 'description', 'filename'])
+entry_query = simplesearch.get_query(query_string, ['pn'])
 qs = init_qs.filter(entry_query).order_by('pn', 
'layerbranch__layer')
 else:
 if 'q' in self.request.GET:
@@ -689,7 +689,7 @@ class ClassicRecipeSearchView(RecipeSearchView):
 if category:
 init_qs = init_qs.filter(classic_category__icontains=category)
 if query_string.strip():
-entry_query = simplesearch.get_query(query_string, ['pn', 
'summary', 'description', 'filename'])
+entry_query = simplesearch.get_query(query_string, ['pn'])
 qs = init_qs.filter(entry_query).order_by('pn', 
'layerbranch__layer')
 else:
 if 'q' in self.request.GET:
-- 
1.9.3

-
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH] toaster-manual: describe the way to start Toaster

2015-12-14 Thread Elliot Smith
From: Ed Bartosh <ed.bart...@linux.intel.com>

Recently the way to start Toaster has been simplified.
The only way to start it now is to source toaster script.
Builds can be run either from command line or from Toaster
web interface.

Updated instructions to start toaster according to the
changes described above.

Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.sm...@intel.com>
---
 .../toaster-manual-setup-and-use.xml   | 67 +++---
 1 file changed, 8 insertions(+), 59 deletions(-)

diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.xml 
b/documentation/toaster-manual/toaster-manual-setup-and-use.xml
index 74c00c4..75aaea8 100644
--- a/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ b/documentation/toaster-manual/toaster-manual-setup-and-use.xml
@@ -17,32 +17,12 @@
 
 
 
-If you want to configure and start your builds using the
-Toaster web interface
-(i.e. "Build Mode"),
-navigate to the root of your
+Navigate to the root of your
 Source 
Directory
 (e.g. poky):
 
  $ cd poky
 
-Next, start Toaster:
-
- $ bitbake/bin/toaster
-
-Open your favourite browser and enter the following:
-
- http://127.0.0.1:8000
-
-If you would rather configure and start your builds
-using the command line
-(i.e. Analysis Mode),
-you can get Toaster to "listen"
-to your builds and collect information about them.
-To do that, navigate to the root of your Source Directory:
-
- $ cd poky
-
 Once in that directory, source the build environment script:
 
  $ source oe-init-build-env
@@ -72,12 +52,7 @@
 By default, Toaster starts on port 8000.
 You can use the WEBPORT parameter to
 set a different port.
-For example, either of the following commands sets the
-port to "8400":
-
- $ bitbake/bin/toaster webport=8400
-
-or
+For example, the following command sets the port to "8400":
 
  $ source ../bitbake/bin/toaster webport=8400
 
@@ -88,18 +63,10 @@
 The Directory for Cloning Layers
 
 
-If you are running Toaster in
-Build Mode,
 Toaster creates a _toaster_clones
 directory inside your Source Directory
-(i.e. poky).
-For example, suppose you use this command to start Toaster:
-
- poky/bitbake/bin/toaster
-
-In this example, Toaster creates and uses the
-poky/_toaster_clones
-directory to clone any layers needed for your builds.
+(i.e. poky) to clone any layers
+needed for your builds.
 
 
 
@@ -117,17 +84,9 @@
 The Build Directory
 
 
-If you are running Toaster in
-Build Mode,
 Toaster creates a build directory within your Source
-Directory (e.g. poky).
-For example, suppose you use this command to start Toaster:
-
- poky/bitbake/bin/toaster
-
-In this example, Toaster creates and uses the
-poky/build
-directory to execute the builds.
+Directory (e.g. poky) to execute
+the builds.
 
 
 
@@ -136,7 +95,7 @@
 the TOASTER_DIR environment variable,
 which takes precedence over your current working directory.
 Setting this environment variable causes Toaster to use
-$TOASTER_DIR./build as the build directory.
+$TOASTER_DIR/build as the build directory.
 
 
 
@@ -217,10 +176,7 @@
 The production instance is also the setup that can cope with
 heavier loads on the web service.
 Use the instructions in the following sections to set up
-Toaster in
-Build Mode
-where builds and projects are run,
-viewed, and defined through the Toaster web interface.
+Toaster to run builds through the Toaster web interface.
 
 
 
@@ -333,13 +289,6 @@
  STATIC_ROOT = '/var/www/toaster/static_files/'
 
 
-
-Enable Build Mode by adding the following
-line to settings.py:
-
- BUILD_MODE=True
-
-