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 703700 - Propose to install Tracker when unavalaible
Propose to install Tracker when unavalaible
Status: RESOLVED FIXED
Product: bijiben
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Bijiben maintainer(s)
Bijiben maintainer(s)
: 704384 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-07-06 09:21 UTC by Manish Sinha
Modified: 2017-06-10 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tell the use if tracker fails (17.21 KB, patch)
2013-07-11 23:22 UTC, Pierre-Yves Luyten
accepted-commit_now Details | Review

Description Manish Sinha 2013-07-06 09:21:50 UTC
At the moment during compile/configure time, bijiben does not check for tracker, but when built and installed, it runs for a second showing the window and crashes.

Just installing libtracker-sparql does not work, it works only after I installed
tracker, tracker-extract, tracker-miner-fs, tracker-utils

Atleast the exit can be graceful

The backtrace is

  • #0 tracker_sparql_connection_query_async
    from /usr/lib/libtracker-sparql-0.16.so.0
  • #1 bjb_query_async
    at biji-tracker.c line 332
  • #2 biji_get_all_collections_async
    at biji-tracker.c line 350
  • #3 enumerate_next_files_ready_cb
    at provider/biji-local-provider.c line 200

Comment 1 André Klapper 2013-07-07 11:54:23 UTC
(In reply to comment #0)
> At the moment during compile/configure time, bijiben does not check for
> tracker, but when built and installed, it runs for a second showing the window
> and crashes.

So probably https://git.gnome.org/browse/bijiben/tree/configure.ac#n49 needs some extending...
Comment 2 Manish Sinha 2013-07-07 21:00:06 UTC
I tried removing tracker-extract, tracker-miner-fs, tracker-utils and left only tracker installed. bijiben does not crash.

If I remove tracker (with tracker-control) it crashes when exiting the app.

I am not an expert in tracker, but in Ubuntu I can install tracker-sparql without installing tracker, tracker-extract, tracker-miner-fs, tracker-utils - Not sure if it is a dependency issue in Ubuntu or tracker or this is how things are supposed to be
Comment 3 Pierre-Yves Luyten 2013-07-08 11:48:20 UTC
Thanks for the details, on the Ubuntu side I can confirm another user solved this installing tracker.

Not closing the bug : bijiben needs to detect the issue at runtime to provide some useful graphical error message (idealy, proposing the user to install tracker with one click..)
Comment 4 Manish Sinha 2013-07-10 22:48:06 UTC
I would suggest that at the moment when tracker is not detected, the app show a message on terminal/alert box and exit.
At the moment, when the function tracker_sparql_connection_get fails, it is just printed on screen. The application should terminate at that point.


Sometime in future PackageKit support can be added to allow installing the dependent package painlessly.
Comment 5 Pierre-Yves Luyten 2013-07-11 23:22:13 UTC
Created attachment 248979 [details] [review]
Tell the use if tracker fails
Comment 6 Pierre-Yves Luyten 2013-07-11 23:23:32 UTC
Is someone brave enough to test the patch? my Ubuntu vm is still on 3.8 i won't be able to check this properly. It does implement anything about PK, just displays some GUI
Comment 7 Manish Sinha 2013-07-11 23:33:21 UTC
Review of attachment 248979 [details] [review]:

> if (error!= NULL) {
> +    g_warning ("%s", error->message);
> +    g_error_free (error);
> +    bjb_window_base_switch_to (window, BJB_WINDOW_BASE_ERROR_TRACKER);
> +    goto out;
> +  }
> +
> +
>    if (file != NULL)
>      note = biji_note_get_new_from_file (self->priv->book,
>                                          g_file_get_path(file));
> @@ -68,6 +77,8 @@ bijiben_new_window_internal (GApplication *app,
>    else
>      bjb_window_base_switch_to (window, BJB_WINDOW_BASE_MAIN_VIEW);
>  
> +
> +  out:
>   gtk_widget_show_all (GTK_WIDGET (window));

How about?

if (error!= NULL) {
  g_warning ("%s", error->message);
  g_error_free (error);
  bjb_window_base_switch_to (window, BJB_WINDOW_BASE_ERROR_TRACKER);
}
else {
   if (file != NULL)
     note = biji_note_get_new_from_file (self->priv->book,
                                         g_file_get_path(file));
   bijiben_new_window_internal (GApplication *app,
   else
     bjb_window_base_switch_to (window, BJB_WINDOW_BASE_MAIN_VIEW);
}
  gtk_widget_show_all (GTK_WIDGET (window));

Or something like this? Use if-else ladder instead of gotos?
Comment 8 Manish Sinha 2013-07-11 23:35:28 UTC
I can check if it works in a few hours when I will have access to ubuntu-gnome with gnome 3.9.x components/modules, so at the moment just reviewing the logic.

At that time can you review this patch on another bug
https://bugzilla.gnome.org/show_bug.cgi?id=703703#c8
Comment 9 Manish Sinha 2013-07-12 01:31:43 UTC
Review of attachment 248979 [details] [review]:

I tried out this patch and bijiben did not crash. Looks good except for the comment I posted above.
Comment 10 Pierre-Yves Luyten 2013-07-12 21:38:40 UTC
Thanks much for the feedback.

The crash should not happen again, but keeping this bug opened to keep track of a better fix - propose to install and restart
Comment 11 Manish Sinha 2013-07-12 22:12:58 UTC
True. The correct way would be to propose installing tracker via PK. Still this patch can be committed
Comment 12 Matthias Clasen 2013-07-13 18:26:49 UTC
tbh, I don't think this makes much sense to do runtime detection and show confusing warnings to the user. Tracker is a hard dependency of gnome-shell, gnome-documents, gnome-photos, etc. Its presence can be pretty much assumed in gnome applications.
Comment 13 Pierre-Yves Luyten 2013-07-17 12:06:21 UTC
*** Bug 704384 has been marked as a duplicate of this bug. ***
Comment 14 Allan Day 2014-04-17 10:55:41 UTC
(In reply to comment #12)
> tbh, I don't think this makes much sense to do runtime detection and show
> confusing warnings to the user. Tracker is a hard dependency of gnome-shell,
> gnome-documents, gnome-photos, etc. Its presence can be pretty much assumed in
> gnome applications.

I agree. It makes sense to do a compile time check, but using a GUI or any other mechanism to automatically install Tracker really doesn't make sense. We assume that Tracker will be present, and functionality (let alone UI) that is added do here is likely to rot. I certainly won't be testing it.
Comment 15 Khurshid Alam 2017-06-10 08:13:59 UTC
So is it possible to compile bijiben without tracker? If yes then how?