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 787246 - libtracker-control: Let miner_manager_index_file accept a GCancellable
libtracker-control: Let miner_manager_index_file accept a GCancellable
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
1.99.x
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2017-09-04 11:29 UTC by Debarshi Ray
Modified: 2017-09-11 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-control: Let miner_manager_index_file accept a GCancellable (4.20 KB, patch)
2017-09-04 11:39 UTC, Debarshi Ray
committed Details | Review
libtracker-control: Add migration docs (3.30 KB, patch)
2017-09-05 10:33 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-09-04 11:29:49 UTC
Since tracker-2.0 is going to be a new major version with a new *.pc file name, it is a good to time to fix minor rough edges in the API. eg., tracker_miner_manager_index_file should accept a GCancellable.
Comment 1 Debarshi Ray 2017-09-04 11:39:36 UTC
Created attachment 359069 [details] [review]
libtracker-control: Let miner_manager_index_file accept a GCancellable

I haven't touched the libtool version string, though.
Comment 2 Carlos Garnacho 2017-09-04 14:41:49 UTC
Comment on attachment 359069 [details] [review]
libtracker-control: Let miner_manager_index_file accept a GCancellable

I think makes sense to make the change under the 1.99.x/2.x umbrella. Luckily there's not that many users of the sync version of this call according to debian codesearch:
https://codesearch.debian.net/search?q=tracker_miner_manager_index_file

It would be nice to add some minimal description about it to libtracker-control API reference, the libtracker-miner similar doc could work as an inspiration:
https://git.gnome.org/browse/tracker/tree/docs/reference/libtracker-miner/migrating-1to2.xml

Would be nice to have that done together with this change, otherwise I'll add the docs blurb before next release.
Comment 3 Debarshi Ray 2017-09-04 18:00:18 UTC
Comment on attachment 359069 [details] [review]
libtracker-control: Let miner_manager_index_file accept a GCancellable

Pushed to master.
Comment 4 Debarshi Ray 2017-09-04 18:01:07 UTC
(In reply to Carlos Garnacho from comment #2)

Thanks for the review!

> Comment on attachment 359069 [details] [review] [review]
> It would be nice to add some minimal description about it to
> libtracker-control API reference, the libtracker-miner similar doc could
> work as an inspiration:
> https://git.gnome.org/browse/tracker/tree/docs/reference/libtracker-miner/
> migrating-1to2.xml

I didn't realize that there is also a migration guide! That's nice. I will add something to it.
Comment 5 Debarshi Ray 2017-09-05 10:33:01 UTC
Created attachment 359171 [details] [review]
libtracker-control: Add migration docs
Comment 6 Philip Withnall 2017-09-10 17:44:48 UTC
Review of attachment 359069 [details] [review]:

::: src/libtracker-control/tracker-miner-manager.c
@@ +1559,3 @@
 	g_return_val_if_fail (TRACKER_IS_MINER_MANAGER (manager), FALSE);
 	g_return_val_if_fail (G_IS_FILE (file), FALSE);
+	g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));

Should be g_return_val_if_fail().

I’ve just pushed a fix as d6253a40. (I hope you don’t mind.)
Comment 7 Carlos Garnacho 2017-09-10 21:23:57 UTC
Not at all :)
Comment 8 Carlos Garnacho 2017-09-10 21:25:54 UTC
Comment on attachment 359171 [details] [review]
libtracker-control: Add migration docs

This one should go too before tomorrow's release. Thanks Debarshi :)
Comment 9 Debarshi Ray 2017-09-11 11:44:21 UTC
(In reply to Philip Withnall from comment #6)
> Review of attachment 359069 [details] [review] [review]:
> 
> ::: src/libtracker-control/tracker-miner-manager.c
> @@ +1559,3 @@
>  	g_return_val_if_fail (TRACKER_IS_MINER_MANAGER (manager), FALSE);
>  	g_return_val_if_fail (G_IS_FILE (file), FALSE);
> +	g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
> 
> Should be g_return_val_if_fail().
> 
> I’ve just pushed a fix as d6253a40. (I hope you don’t mind.)

Oops! That was embarrassing. Thanks for the fix.
Comment 10 Debarshi Ray 2017-09-11 11:45:01 UTC
Comment on attachment 359171 [details] [review]
libtracker-control: Add migration docs

Thanks for the review. Pushed to master.