Bug#462332: yelp doesn't find some info pages

J.H.M. Dassen (Ray) fsmla at xinara.org
Thu Aug 14 14:09:56 UTC 2008


notfound 462332 yelp/2.20.0-1
reassign 462332 librarian0
found 462332 librarian0 0.8.0-2
tags 462332 + upstream patch
thanks

On Thu, Jan 24, 2008 at 01:08:47 +0100, Matthias Berndt wrote:
> When I type yelp info:libc in a terminal, yelp displays the libc info page 
> just as it should. When I type yelp info:gcc, it shows the gcc man page 
> instead of the info page (I do have the gcc info page installed). 

On Sun, Feb 17, 2008 at 00:22:31 +0100, Matthias Berndt wrote:
> > Does the GCC info page still appear in the index, when you start yelp
> > and click “Info pages” ?
> It shows up as gcc-4.1 there. In fact, when I enter yelp info:gcc-4.1, the 
> info page is shown. However, other programs such as GNU info, pinfo or 
> khelpcenter seem to do some guessing when they can't find an info page. 
> It's probably confusing to see the same thing work in every info browser 
> but yelp. 

Yelp relies on librarian0's rrn_info_find_from_uri() to match search strings
to document names in the info "dir" file.

Unlike the behaviour of the other info readers, this function currently
considers full matches only, i.e. it does not consider the search string
"gcc" to be a match for "gcc-4.1". By switching to prefix matching as
follows, its behaviour becomes closer to that of other info readers.

diff -ruN rarian-0.8.0/librarian/rarian-info.c rarian-0.8.0.hacked/librarian/rarian-info.c
--- rarian-0.8.0/librarian/rarian-info.c	2008-03-09 19:46:22.000000000 +0100
+++ rarian-0.8.0.hacked/librarian/rarian-info.c	2008-08-14 15:43:39.000000000 +0200
@@ -657,8 +657,8 @@
   l = info_head;
 
   while (l) {
-    if ((l->reg->doc_name && !strcmp (uri, l->reg->doc_name)) ||
-	(!strcmp (uri, l->reg->name))) {
+    if ((l->reg->doc_name && !strncmp (uri, l->reg->doc_name, strlen(uri))) ||
+	(!strncmp (uri, l->reg->name, strlen(uri)))) {
       if (!section || (*section && l->reg->section && !strcmp (l->reg->section, section))) {
 	return l->reg;
       } else {

HTH,
Ray
-- 
THEY planted The Lone Gunmen to MIND CONTROL the public into seeing TRUTH
SEEKERS as CONSPIRACY NUTS.





More information about the pkg-gnome-maintainers mailing list