From 2dad8a2fc4c4b632d676d5ae0417011bb10be6c6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 3 Nov 2006 19:48:29 +0000 Subject: [PATCH] improve man page handling --- yelp-2.16.0-apropos.patch | 30 ++++++++++++++++++++++++++++++ yelp.spec | 9 ++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 yelp-2.16.0-apropos.patch diff --git a/yelp-2.16.0-apropos.patch b/yelp-2.16.0-apropos.patch new file mode 100644 index 0000000..aadf220 --- /dev/null +++ b/yelp-2.16.0-apropos.patch @@ -0,0 +1,30 @@ +--- yelp-2.16.0/src/yelp-search-pager.c.apropos 2006-11-03 14:06:37.000000000 -0500 ++++ yelp-2.16.0/src/yelp-search-pager.c 2006-11-03 14:32:34.000000000 -0500 +@@ -2039,8 +2039,16 @@ + gchar *title = NULL; + /*gint i;*/ + +- if (line == NULL || line[0] == NULL || line[1] == NULL) +- continue; ++ if (line == NULL || line[0] == NULL || line[1] == NULL) ++ 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], ")"); +@@ -2068,6 +2076,8 @@ + xmlNewChild (child, NULL, BAD_CAST "score", + BAD_CAST "0.1"); + g_free (tmp); ++ ++done: + g_strfreev (line); + } + diff --git a/yelp.spec b/yelp.spec index 61c6b5f..a2b391e 100644 --- a/yelp.spec +++ b/yelp.spec @@ -19,7 +19,7 @@ Summary: A system documentation reader from the Gnome project Name: yelp Version: 2.16.1 -Release: 5%{?dist} +Release: 6%{?dist} Source: %{name}-%{version}.tar.bz2 # http://bugzilla.gnome.org/show_bug.cgi?id=319096 Patch1: yelp-2.15.5-fedora-docs.patch @@ -27,6 +27,9 @@ Patch2: yelp-2.13.2-add-mime-handling.patch Patch3: yelp-2.15.91-use-pango.patch # backports from cvs Patch4: yelp-2.16.1-crash-fixes.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=370167 +Patch5: yelp-2.16.0-apropos.patch + License: GPL Group: Applications/System BuildRoot: %{_tmppath}/%{name}-root @@ -84,6 +87,7 @@ one central tool. %patch2 -p1 -b .add-mime-handling %patch3 -p1 -b .use-pango %patch4 -p1 -b .crash-fixes +%patch5 -p1 -b .apropos %build %configure \ @@ -144,6 +148,9 @@ update-desktop-database &> /dev/null ||: %{_datadir}/yelp %changelog +* Fri Nov 3 2006 Matthias Clasen - 2.16.1-6 +- Improve the whatis parser + * Fri Nov 3 2006 Matthias Clasen - 2.16.1-5 - Silence %%pre