GNOME Bugzilla – Bug 511244
Update beagle to use new API
Last modified: 2009-09-22 01:48:35 UTC
The beagle C API seems to have changed: yelp-yelp-search-parser.o: In function `search_parser_process_idle': /home/nx/code/svn/gnome/yelp/src/yelp-search-parser.c:565: undefined reference to `beagle_query_add_source' collect2: ld returned 1 exit status make[3]: *** [yelp] Error 1 make[3]: Leaving directory `/home/nx/code/svn/gnome/yelp/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/nx/code/svn/gnome/yelp/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/nx/code/svn/gnome/yelp' make: *** [all] Error 2 This needs to be updated.
Love to. Alas, I don't know enough about Beagle. CCing Joe Shaw as he will make it work (I hope)
Adding the broader Beagle hackers to the bug.
It should be a one line replacement, as described in http://www.mail-archive.com/dashboard-hackers%40gnome.org/msg04051.html beagle_query_add_source (query, "documentation"); should be replaced by beagle_query_add_text (query, "source:documentation"); I havent tested this, but this should be enough.
Something I forgot, recent beagle versions build a system wide manpage index. If yelp can handle manpages (I think it can) and you want to use beagle to search for manpages then replace by the following one (instead of the one above): beagle_query_add_text (query, "source:documentation OR source:manpages");
Created attachment 106317 [details] [review] Make Yelp work with Beagle-0.3 as well I have verified this patch against current svn HEAD
Yelp still crashes(In reply to comment #5) > Created an attachment (id=106317) [edit] > Make Yelp work with Beagle-0.3 as well > > I have verified this patch against current svn HEAD Update: this doesn't work -- there is some strange race(?) that causes Yelp to crash very often when it is using Beagle to search.
Created attachment 107112 [details] [review] fix crash with beagle This one fixes the crash (and fixes the build and one cosmetic fix). The crash is fixed by the parser->snippet_request_count change. Otherwise, the final_transform starts as soon as the first batch of snippets arrive and then when the next batch arrives, the document is already way into final-transform. At least thats what I gathered by setting YELP_DEBUG=all. Did a limited testing with documentation and manpages system-wide index.
(In reply to comment #7) > Created an attachment (id=107112) [edit] > fix crash with beagle This worked for me -- thanks!
Created attachment 108104 [details] [review] Final merged patch to fix yelp with beagle-0.3 Merged the above patches to make one patch to fix them all. :)
Patch looks okay to me. I'm not a Beagle expert, so I'm taking your word for it. Committed. Many thanks. Any further problems, please file a new bug. 2008-05-25 Don Scorgie <dscorgie@svn.gnome.org> * configure.in: * src/yelp-search-parser.c (check_finished), (snippet_response), (search_parser_process_idle): Add support for newer releases of Beagle bug #511244 - patch from Arun Raghavan