[recipes/recipe-link: 4/8] recipe: Allow searching just by name



commit b729827ab12b72c22dcdddc2a57470259a93a1c5
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 28 22:49:48 2016 -0500

    recipe: Allow searching just by name
    
    This will be used in the next few commits.

 src/gr-recipe.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe.c b/src/gr-recipe.c
index bc3fab1..b0c17ca 100644
--- a/src/gr-recipe.c
+++ b/src/gr-recipe.c
@@ -662,6 +662,12 @@ gr_recipe_matches (GrRecipe   *recipe,
 
                         continue;
                 }
+                else if (g_str_has_prefix (terms[i], "na:")) {
+                        if (recipe->cf_name && strstr (recipe->cf_name, terms[i] + 3) == NULL)
+                                return FALSE;
+                        continue;
+
+                }
 
                 if (recipe->cf_name && strstr (recipe->cf_name, terms[i]) != NULL)
                         continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]