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 775935 - Build failure without tracker
Build failure without tracker
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.22.x
Other Linux
: Normal normal
: 3.22
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 776898 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-12-10 20:20 UTC by Armin K.
Modified: 2017-01-26 09:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
general: fix failing builds with tracker disabled (4.59 KB, patch)
2016-12-18 17:21 UTC, Ernestas Kulik
committed Details | Review
add bath rename build option (5.76 KB, patch)
2017-01-01 18:15 UTC, vitalik_p
rejected Details | Review
nautilus-file: reorder tracker dependant functions (8.33 KB, patch)
2017-01-26 09:30 UTC, Carlos Soriano
committed Details | Review

Description Armin K. 2016-12-10 20:20:44 UTC
Nautilus 3.22.2 fails to build without tracker due to https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-22&id=d181a8bac576a36978939e5b4ae20ea67c58fcf9 pulling nautilus-batch-rename-utilities.h and nautilus-batch-rename-dialog.h into nautilus-file-undo-operations.c

Resulting in:

  CC       nautilus-file-undo-operations.lo
In file included from nautilus-file-undo-operations.c:35:
./nautilus-batch-rename-utilities.h:24:10: fatal error: 'tracker-sparql.h' file not found
#include <tracker-sparql.h>
         ^
1 error generated.
Comment 1 Rémi Cardona 2016-12-18 16:21:57 UTC
This bug is preventing us from bumping nautilus in Gentoo as we allow users to disable tracker support (which I personally do).

I tried looking into it but I hit a wall pretty quickly.  AIUI, batch_rename_sort_lists_for_rename() does not actually depend on tracker, but was moved over to nautilus-batch-rename-utilities.c which is only built when tracker support is enabled.

#ifdef'ing this file looks like a dead end because almost all of that file does depend on tracker.  The only possibility I see is to move that function out of batch-rename-utilities.c to a file where tracker support is not mandatory.

I wish I could provide a patch for this but this is beyond my knowledge of nautilus.

TIA for considering this bug.

Cheers
Comment 2 Ernestas Kulik 2016-12-18 17:21:17 UTC
Created attachment 342177 [details] [review]
general: fix failing builds with tracker disabled

Batch rename-related source files are conditionally built depending on
whether Tracker support is enabled. Despite that, some code that depends
on batch rename support is included in some core source files without
being conditionally compiled as well.
Comment 3 Ernestas Kulik 2016-12-18 17:22:35 UTC
(In reply to Ernestas Kulik from comment #2)
> Created attachment 342177 [details] [review] [review]
> general: fix failing builds with tracker disabled
> 
> Batch rename-related source files are conditionally built depending on
> whether Tracker support is enabled. Despite that, some code that depends
> on batch rename support is included in some core source files without
> being conditionally compiled as well.

It’s just some naive #ifdefing, but Nautilus seems to build and work fine (haven’t tested much, however).
Comment 4 vitalik_p 2017-01-01 18:15:44 UTC
Created attachment 342696 [details] [review]
add bath rename build option
Comment 5 vitalik_p 2017-01-01 18:21:03 UTC
batch rename require tracker package, so adding batch rename build option must solve this bug. 

patch tested on nautilus 3.22.2
Comment 6 Ernestas Kulik 2017-01-01 18:38:06 UTC
Review of attachment 342696 [details] [review]:

Thanks for the patch!

Your commit message is a little brief, you might want to check our guidelines here: https://wiki.gnome.org/Newcomers/CodeContributionWorkflow
Another thing to note is that you should base the patch on master, as it will be landing there.

Now, for the actual patch: it causes new warnings, namely for batch_rename_get_info_callback (), which goes unused, so some more code needs ifdefing.
I am not sure whether Carlos will agree to this and therefore cannot say in confidence that your work will get accepted, but I like your idea nonetheless.
Comment 7 Carlos Soriano 2017-01-01 21:49:06 UTC
Review of attachment 342696 [details] [review]:

hey, afaics batch  rename should work withouth tracker too. We already do some handling to allow it. So instead of ifdef all batch renaming we should just take off the tracker part as we were doing before the regression. It mightbrequire some refactoring.
Comment 8 Carlos Soriano 2017-01-04 09:43:19 UTC
I'm looking again at this, maybe I was wrong.
Comment 9 Ernestas Kulik 2017-01-04 09:49:24 UTC
(In reply to Carlos Soriano from comment #8)
> I'm looking again at this, maybe I was wrong.

No, I think it is possible to get it to work without metadata support.
Comment 10 Ernestas Kulik 2017-01-05 13:32:10 UTC
*** Bug 776898 has been marked as a duplicate of this bug. ***
Comment 11 Carlos Soriano 2017-01-05 14:58:24 UTC
ok, I will fix this asap since I guess is preventing some distros on shipping newest nautilus and do a new release with this
Comment 12 Rémi Cardona 2017-01-05 21:50:59 UTC
(In reply to Carlos Soriano from comment #11)
> ok, I will fix this asap since I guess is preventing some distros on
> shipping newest nautilus and do a new release with this

That would be most appreciated, thank you for taking care of this!

Cheers
Comment 13 Carlos Soriano 2017-01-26 08:57:53 UTC
Review of attachment 342177 [details] [review]:

This is probably the best solution...making batch rename work without tracker is not a trivial task.

Thanks for the patience on taking long to review!
Comment 14 Carlos Soriano 2017-01-26 09:30:56 UTC
Created attachment 344295 [details] [review]
nautilus-file: reorder tracker dependant functions

And put them together to have a single idfdef, more manageable.
Comment 15 Carlos Soriano 2017-01-26 09:32:31 UTC
pushed to master and 3.22

Attachment 342177 [details] pushed as 18d52a7 - general: fix failing builds with tracker disabled
Attachment 344295 [details] pushed as b062c8c - nautilus-file: reorder tracker dependant functions