yelp/yelp-2.19.1-apropos.patch
Matthew Barnes bdc6cda6a9 - Update to 2.19.1
- Adapt the "apropos" patch for 2.19.1.
- The "posix-man" patch appears to no longer apply.
- Update dependencies based on configure.ac.
2007-08-02 16:53:02 +00:00

29 lines
781 B
Diff

--- yelp-2.19.1/src/yelp-search-parser.c.apropos 2007-08-02 10:27:12.000000000 -0400
+++ yelp-2.19.1/src/yelp-search-parser.c 2007-08-02 10:29:09.000000000 -0400
@@ -1294,7 +1294,15 @@ process_man_result (YelpSearchParser *pa
/*gint i;*/
if (line == NULL || line[0] == NULL || line[1] == NULL)
- continue;
+ goto done;
+
+ /* RH man inserts rpm references into the whatis database */
+ if (g_str_has_prefix (line[1], "rpm)"))
+ goto done;
+
+ tmp = strchr (line[0], ' ');
+ if (tmp)
+ *tmp = '\0';
title = g_strdup (g_strstrip (line[0]));
after = strstr (line[1], ")");
@@ -1322,6 +1330,8 @@ process_man_result (YelpSearchParser *pa
xmlNewChild (child, NULL, BAD_CAST "score",
BAD_CAST "0.1");
g_free (tmp);
+
+done:
g_strfreev (line);
}