summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Remove "blacklisting" TrackerMonitor testsCarlos Garnacho2017-11-141-485/+0
| | | | | | TrackerMonitor doesn't try to merge events anymore besides the obvious [CREATED|UPDATED]* + CHANGES_DONE_HINT. These tests simply don't reflect current TrackerMonitor behavior so were removed.
* tests: Minor update to TrackerFileNotifier testCarlos Garnacho2017-11-142-3/+3
| | | | | | Because the way the file is created, we will get a create and an update here. TrackerMonitor won't merge those together anymore, but TrackerMinerFS will, so just acknowledge it's expected in this test.
* libtracker-miner: Clean up TrackerMonitorCarlos Garnacho2017-11-141-653/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to implement our own caching and timeout mechanism on top of GIO's, and our own "blacklisting" that would merge or transform events depending on the previouly cached content. This adds quite some extra latency in some cases on top of GFileMonitor's rate (up to 2s), and even in some cases do produce mistaken results (CREATE(a)+MOVE(a->b) != CREATE(b) if you are rewriting a file, but how can TrackerMonitor know). The code has been simplified in various fronts: - (Almost) no event caching. Only CREATED/UPDATED events are possibly cached awaiting for the CHANGES_DONE_HINT that must follow them. - No event manipulation nor merging. GFileMonitor does a good job at being truthful, and the upper layers do know better how to coalesce events into a more reduced set of equivalent tasks, since there's further info like file state in the database. - The deprecated SEND_MOVED flag has been replaced by WATCH_MOVES. The MOVED_IN/MOVED_OUT/RENAMED events can be handled in a simpler way each than the deprecated MOVED event. Overall this makes TrackerMonitor slightly more verbose (but still consistent wrt sending a meaninful sequential set of changes), but more reactive overall, since we now solely rely on GFileMonitor rate limits. With this change, TrackerMinerFS is left as the only place that does coalescing of events.
* libtracker-miner: Disable monitoring when dealing with unknown monitorsCarlos Garnacho2017-11-141-6/+5
| | | | | We just can't do safe assumptions about its limits or behavior, seems best to turn monitoring off altogether.
* libtracker-miner: Remove FEN directory monitor handling branchCarlos Garnacho2017-11-141-7/+0
| | | | | The code supporting Solaris file monitors went away from glib ~2y ago.
* libtracker-miner: Remove ifdef around useful featureCarlos Garnacho2017-11-141-23/+4
| | | | | | | | The mentioned bug got fixed ~6y ago, but the changes making use of the feature for some reason got stuck under a define that's never defined. This is an useful feature, so rely on it without further ado.
* libtracker-miner: Remove dead TrackerMonitor codeCarlos Garnacho2017-11-141-59/+0
| | | | | | The PAUSE_ON_IO feature required someone to notice it and modify tracker code to #define instead of #undef. I discovered it before, and chose to remove it instead.
* libtracker-miner: Fix content filter with default policy=denyCarlos Garnacho2017-11-141-8/+16
| | | | | | We deemed the directory as bad whenever any file didn't match the filter, but files that don't match the filter should not trigger it in one way or another.
* libtracker-miner: Intern GFiles on TrackerMonitor::item-movedCarlos Garnacho2017-11-141-14/+28
| | | | | | The assumption is that TrackerFileNotifier emits files that are currently interned in the TrackerFileSystem. This event handler broke the assumption in a couple of places.
* libtracker-miner: Remove double caching of file IRICarlos Garnacho2017-11-141-43/+11
| | | | | | This is doubly cached in the TrackerFileSystem and as GObject qdata (and obtained from the former in that case). Let's just rely on the former for all.
* libtracker*: Lower g_message()s to g_debug()Carlos Garnacho2017-11-143-12/+10
| | | | | | | | This is library code, so let's use g_debug() which obeys G_MESSAGES_DEBUG, instead of g_message() which shall be printed unless there is an special log handler that filters those out. This code may run on 3rd party code, where we can't trust we'll have a log handler that catches those from going to stdout.
* libtracker-miner: Fix argument orderCarlos Garnacho2017-11-141-2/+2
| | | | | | | Despite the order implied here, the source/dest GFiles were emitted in the inverse order. Funnily tracker-miners and everything else around gets the order right, so it's really the header definition what is backwards here.
* libtracker-miner: Remove unused quarksCarlos Garnacho2017-11-141-4/+0
|
* libtracker-miner: Refactor processing queuesCarlos Garnacho2017-11-141-440/+290
| | | | | | | | | | | | Replace all 4 queues for the different create/update/delete/move events with a single queue that contains generic QueueEvent structs. The GList node of the last event is stored as GFile qdata, in order to perform fast lookups when coalescing events. queue_event_coalesce() will attempt to convert any two events into less than that, it does rely on merging two events with no related events in between, those should be coalesced (or attempted to) when they arrive.
* libtracker-miner: Remove reentry counter and failed task reinsertionCarlos Garnacho2017-11-142-61/+52
| | | | | | | | | | | | | | | | TrackerFileNotifier guarantees that parent files are emitted before any children, the other usecase that this used to cover are explicit tracker_miner_fs_check_file() calls which used to also index parent directories, but it doesn't do that anymore since quite some time. So the only remaining case where we could end up with a file whose parent is neither being currently processed nor indexed is actual bugs. In that case, the bug likely won't go away by trying harder, which leads to logging for every child file, as they'll fail in cascade. Let's be less stubborn here, warn (once!) about the missing file and ditch all pending events happening on/inside it. People love filing bugs about tracker logging stuff, so I don't think bugs will go unnoticed anyway.
* libtracker-miner: Use g_clear_pointerCarlos Garnacho2017-11-141-22/+6
| | | | Seems quite fit to manage priv->current_index_root.
* libtracker-miner: Simplify code a bitCarlos Garnacho2017-11-141-9/+7
| | | | | We can steal data sooner in order to avoid unsetting the data in the early return path.
* libtracker-miner: Properly honor TRACKER_DIRECTORY_FLAG_CHECK_MTIMECarlos Garnacho2017-11-141-21/+21
| | | | | | | | | | TrackerFileNotifier actually triggered mtime checks more often than necessary. All of the sparql queries can be skip, also storing the filesystem mtimes (because no sparql mtimes will be queried to compare with). We just need setting up our TrackerFileSystem tree, and adding directory monitors, so do this bare minimum.
* libtracker-miner: Drop GFile array argument from directory content queriesCarlos Garnacho2017-11-141-28/+14
| | | | | We always perform those one directory at a time, so drop the array/len arguments from directory content queries, and just pass a GFile around.
* libtracker-miner: Drop generic depth handling from TrackerFileNotifierCarlos Garnacho2017-11-141-60/+19
| | | | | We currently always process directories one by one, but we preserved the variable depth handling. This can be simplified away.
* libtracker-miner: Remove TrackerCrawler max_depth argumentCarlos Garnacho2017-11-144-118/+12
| | | | | | | | | It was always called with depth=1 (return just direct children of the given folder), so make this the default. Admittedly, the "crawler" name is a bit of an stretch now. The TrackerCrawler tests have also been removed the recursive tests, since that's not possible anymore.
* libtracker-direct: Implement update_array_async()Carlos Garnacho2017-11-141-0/+33
| | | | | This doesn't yield as many benefits as it does bring on the DBus backend, but still worth implementing for consistence.
* tests: Add tests for libtracker-miner's TrackerMinerFSCarlos Garnacho2017-11-143-0/+1976
| | | | | | | This object can now be tested without raising tracker-store instances nor other DBus facilities. This is a first stab at a comprehensive set of tests checking TrackerMinerFS behavior (API, startup, monitoring, ...).
* meson: Remove options that are only relevant to tracker-minersSam Thursfield2017-10-313-73/+0
| | | | The tracker-miners now live in a separate repo.
* meson: Remove erroneous reference to tracker-parser-sha1.h.inSam Thursfield2017-10-311-1/+0
| | | | | | This file doesn't exist, we generate the header file from scratch with a script. Meson seems to have not raised an error in this situation in the past, but with 0.43 the build fails.
* meson: Fix use of nonexistant 'default' keywordSam Thursfield2017-10-311-3/+3
| | | | The correct keyword is 'value'.
* libtracker-common: Add tracker-seccomp from the libtracker-miners librarySam Thursfield2017-10-193-0/+264
| | | | | | | This module is only used in the tracker-miners repo. However, when building this repo as a Meson subproject of tracker-miners.git, we can only build one version of libtracker-common so we need to have it present in our version.
* meson: Don't install the nao-custom ontologySam Thursfield2017-10-191-1/+0
| | | | | It's actually broken and doesn't get installed by the Autotools build. The tracker-store refuses to start if this ontology is installed.
* meson: Include the gresource ontology data in libtracker-dataSam Thursfield2017-10-183-4/+6
| | | | Fixes an issue in tracker-store
* meson: Install all GSettings schemas and enumsSam Thursfield2017-10-184-2/+33
| | | | | Some were missing altogether, and one was missing its enums which meant it was rejected by the schema compiler.
* Correctly unref g_settings_schemaThomas Bechtold2017-10-121-1/+1
| | | | | | | | | | | This fixes: GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed when calling "tracker daemon" https://bugzilla.gnome.org/show_bug.cgi?id=788883
* tracker: Return correctly for {get,set}_log_verbosityThomas Bechtold2017-10-111-0/+2
| | | | | | | Every command switch should return properly. Otherwise the code reaches g_warn_if_reached () and a warning is printed. https://bugzilla.gnome.org/show_bug.cgi?id=788680
* tests: Remove unused queries from tracker-sparql-testCarlos Garnacho2017-10-051-42/+5
| | | | | | Those were unused (the test would stop at the third query), and I couldn't quite figure out why they were added or what they were specifically testing.
* tests: Check return values for g_chmod/stat/remove callsCarlos Garnacho2017-10-057-13/+13
| | | | | | Makes sense testing for those. Spotted by Coverity (CIDS: 1188421, 1188422, 1188423, 1188430, 1188431, 1188432, 1188433, 1188434, 1188435, 1298206, 1298207, 1298208, 1298209)
* tests: Make libtracker-data tests use separate directoriesCarlos Garnacho2017-10-053-3/+6
| | | | | Those may run in parallel, which is troublesome if all of them try to remove the test directory after all tests are run.
* [l10n] Updated Catalan (Valencian) translationXavi Ivars2017-10-051-2328/+2192
|
* Release 2.0.12.0.1Carlos Garnacho2017-10-043-2/+15
|
* gschema: Fix gettext-domainPiotr Drąg2017-09-301-1/+1
|
* libtracker-miner: Always fallback to URN query when queueing fileCarlos Garnacho2017-09-291-8/+7
| | | | | | | | | | | | Tracker may end up with nfo:FileDataObject prior to handling monitor events. Be it leftover data from previous bugs, explicit "tracker index" calls, or data from some other application. As we can't be really sure of the data consistence, always fallback to a URN query so we don't break nie:url UNIQUE constraint (inverse functional property in SPARQL parlance). https://bugzilla.gnome.org/show_bug.cgi?id=786132
* libtracker-miner: Check directory updates before dropping mtime infoCarlos Garnacho2017-09-291-2/+5
| | | | | | | | | file_notifier_traverse_tree() has the side effect of deleting mtime data, as it's presumably not needed anymore, except here. Check whether the directory was updated before notifying of the files inside, so we can thoroughly check for deleted content. https://bugzilla.gnome.org/show_bug.cgi?id=786132
* libtracker-miner: Use TrackerDecorator variable after checking cancellableCarlos Garnacho2017-09-291-2/+3
| | | | | | It may be actually destroyed if the decorator was cancelled. https://bugzilla.gnome.org/show_bug.cgi?id=785701
* libtracker-sparql: Introspection fix for tracker_notifier_new()Sam Thursfield2017-09-291-2/+2
| | | | The tracker_notifier_new() function allows NULL for 'classes'.
* meson: Fix hardcoded TRACKER_API_VERSION=1.0Sam Thursfield2017-09-281-1/+1
| | | | | This was causing .pc files with wrong dependencies to be generated when building with Meson, and probably other issues.
* meson: Fix misspelled keyword argSam Thursfield2017-09-281-1/+1
|
* meson: NetworkManager should be an optional depSam Thursfield2017-09-271-1/+1
|
* Updated Slovenian translationMatej Urbančič2017-09-271-1380/+1072
|
* Updated Slovenian translationMatej Urbančič2017-09-271-1072/+1380
|
* libtracker-sparql: Fix introspection for Tracker.Notifier.new()Sam Thursfield2017-09-221-1/+2
| | | | The 'classes' parameter wasn't annotated correctly.
* meson: Fix all hardcoded references to 1.0Sam Thursfield2017-09-224-11/+11
| | | | | In some places I had hardcoded '1.0' instead of honouring tracker_api_version variable. This is now fixed.
* docs: Update path that contains API version to 2.0 in man pageSam Thursfield2017-09-221-2/+2
| | | | | We should maybe reword this to not include the API version, but I can't see a simple way right now.