After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 511244 - Update beagle to use new API
Update beagle to use new API
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Search
2.21.x
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-22 13:17 UTC by Michael Monreal
Modified: 2009-09-22 01:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Make Yelp work with Beagle-0.3 as well (954 bytes, patch)
2008-03-01 08:32 UTC, Arun Raghavan
none Details | Review
fix crash with beagle (892 bytes, patch)
2008-03-12 01:36 UTC, Debajyoti Bera
none Details | Review
Final merged patch to fix yelp with beagle-0.3 (1.39 KB, patch)
2008-03-27 09:51 UTC, Arun Raghavan
committed Details | Review

Description Michael Monreal 2008-01-22 13:17:02 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.
Comment 1 Don Scorgie 2008-01-24 20:01:40 UTC
Love to.  Alas, I don't know enough about Beagle.  CCing Joe Shaw as he will make it work (I hope)
Comment 2 Joe Shaw 2008-02-02 19:27:56 UTC
Adding the broader Beagle hackers to the bug.
Comment 3 Debajyoti Bera 2008-02-02 19:57:23 UTC
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.
Comment 4 Debajyoti Bera 2008-02-06 19:23:56 UTC
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");
Comment 5 Arun Raghavan 2008-03-01 08:32:48 UTC
Created attachment 106317 [details] [review]
Make Yelp work with Beagle-0.3 as well

I have verified this patch against current svn HEAD
Comment 6 Arun Raghavan 2008-03-11 18:49:11 UTC
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.
Comment 7 Debajyoti Bera 2008-03-12 01:36:11 UTC
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.
Comment 8 Arun Raghavan 2008-03-12 04:45:52 UTC
(In reply to comment #7)
> Created an attachment (id=107112) [edit]
> fix crash with beagle

This worked for me -- thanks!
Comment 9 Arun Raghavan 2008-03-27 09:51:15 UTC
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. :)
Comment 10 Don Scorgie 2008-05-25 09:24:40 UTC
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