GNOME Bugzilla – Bug 775935
Build failure without tracker
Last modified: 2017-01-26 09:32:40 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.
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
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.
(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).
Created attachment 342696 [details] [review] add bath rename build option
batch rename require tracker package, so adding batch rename build option must solve this bug. patch tested on nautilus 3.22.2
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.
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.
I'm looking again at this, maybe I was wrong.
(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.
*** Bug 776898 has been marked as a duplicate of this bug. ***
ok, I will fix this asap since I guess is preventing some distros on shipping newest nautilus and do a new release with this
(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
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!
Created attachment 344295 [details] [review] nautilus-file: reorder tracker dependant functions And put them together to have a single idfdef, more manageable.
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