summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add missing space in tracker info outputwip/piotrdrag/missing-spacePiotr Drąg2018-06-041-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=794496
* meson: Remove duplicated lineSam Thursfield2018-06-011-1/+0
| | | | | This triggered a warning with meson 0.46 and will be treated as an error by future versions.
* libtracker-sparql: Use replacement for IOSchedulerJob.push() which is still ↵Rico Tzschichholz2018-05-301-2/+2
| | | | deprecated
* cli: Fix invalid SPARQL generated by `tracker tag --list`Sam Thursfield2018-05-191-1/+1
| | | | This was causing the command to fail.
* libtracker-data: DBInterface.create_statement() may not be abstract in valaRico Tzschichholz2018-05-161-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=796104
* meson: Install generated headers without needing a scriptSam Thursfield2018-04-223-24/+5
| | | | | | | | | | This script dates from a long time ago when Meson lacked ways to install generated headers. This fixes an issue where `ninja install` in tracker.git triggers a rebuild of lots of stuff from tracker-miners.git, which happened because the mtime of the installed generated headers would become newer than the build files in tracker-miners.git and cause ninja to rebuild them all.
* libtracker-sparql: Fix wording of function documentationSam Thursfield2018-04-201-4/+3
|
* tracker-store: Remove empty Icon= from the .desktop filePiotr Drąg2018-03-261-1/+0
| | | | It’s going to be confusing gettext when we port Tracker away from intltool.
* libtracker-data: fix compile issue when using --disable-ftsSimental Magana, Marcos2018-02-131-3/+3
| | | | | | | | | previous commit (66a6dc) refactors code, but some lines missed the refactor. This commit fixes the oversight of those lines. Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=793282
* libtracker-data: Perform VACUUM only on large database filesCarlos Garnacho2018-02-133-1/+17
| | | | | | | | | | The agressive VACUUM on shutdown is the cause for the reported slowness in tracker-store restarts. Let's be a bit more conservative, and only trigger VACUUMing when the database file gets hideously large (4GB). There is the remote possibility that a database is still larger than 4GB after VACUUM. I'll just make it suck at the moment and do the same frequent VACUUMs we get currently.
* libtracker-miner: Emit monitor ::file-created for directories immediatelyCarlos Garnacho2018-02-131-1/+7
| | | | | | | | | | | | On monitor events on directories we used to trigger a full crawling, and only notified the directory during recursive handling. However other monitor events may happen immediately on the child, which would get queued immediately before the parent folder (which is being idly crawled). Emit ::file-created immediately here in order to ensure correct ordering in the TrackerMinerFS queue. If notifier_queue_root() ends up notifying about the file again, the event would get eventually discarded or simply handled as an update.
* libtracker-miner: Don't leak TrackerMinerFS:rootDebarshi Ray2018-02-071-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793061
* libtracker-miner: Don't mix sync & async GFileEnumerator APIsDebarshi Ray2018-01-311-54/+39
| | | | | | | | | This enables enumeration of non-native files because GVfs doesn't like to mix asynchronous & synchronous GFileEnumerators. If an enumerator is obtained through one API variant, then it should be used via the same API variant. https://bugzilla.gnome.org/show_bug.cgi?id=792337
* libtracker-miner: Rename a variable for consistencyDebarshi Ray2018-01-311-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792337
* vala: Bump gir_version to 2.0Ting-Wei Lan2018-01-247-7/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792691
* libtracker-sparql: Be more careful about integer sizesDebarshi Ray2018-01-231-3/+3
| | | | | | | | The GVariant type string "i" refers to a signed 32-bit integer. Therefore, gint32 is a much safer bet than gint, whose size is not guaranteed across all platforms. https://bugzilla.gnome.org/show_bug.cgi?id=792301
* tracker-monitor: Tighten the scope of variablesDebarshi Ray2018-01-161-5/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=791067
* Make HAVE_LIBICU checks consistently with #ifdefSam Thursfield2017-12-182-4/+4
| | | | | | | | We were in some places checking the value of HAVE_LIBICU as a boolean and in others checking whether it was defined. This is broken because when it is defined to 0 we mix up the code paths completely. Fixes the Meson build since d5e9ce54196d5c9086423e688c8014c1225b858b.
* meson: Avoid NetworkManager automagic dependencyQuentin Glidic2017-12-161-1/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=791433 Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
* meson: Fix build with libstemmerSam Thursfield2017-12-161-0/+4
| | | | | | Based on a patch by Jeremy Bicha <jbicha@ubuntu.com>. https://bugzilla.gnome.org/show_bug.cgi?id=790373
* Revert "libtracker-common: Add tracker-seccomp from the libtracker-miners ↵Sam Thursfield2017-12-163-264/+0
| | | | | | | | | | | library" This reverts commit 9afd9afc67a2ccbe4d8eee59a4b9be796e794f2d. This is no longer needed, instead we have renamed libtracker-common to libtracker-miners-common in tracker-miners.git so that the two libraries don't conflict when tracker.git is built as a subproject of tracker-miners.git.
* libtracker-miner: Avoid triggering content filters on configured rootsCarlos Garnacho2017-11-141-3/+11
| | | | | | | | | | | | | | | | | | | | Folders being configured as indexing roots should win over any filter that might apply. The basename based filters correctly skip configured roots already, so do the same with the directory content filter. The practical side effect is that .git folders are now allowed on the directories configured in tracker-miner-fs (homedir and XDG dirs most usually). Tracker tries to stay out of source code trees which are a source of pointless grinding, but there's legit usecases to have these folders under git management: - User setups to bring in essential files across machines - Collections managed through git-annex Those are worth handling, even if the question also applies to folders found recursively and the .git heuristic proves limited. https://bugzilla.gnome.org/show_bug.cgi?id=790284
* libtracker-miner: Rename function to be more obviousCarlos Garnacho2017-11-141-19/+12
| | | | | | We don't add a "file", but a whole RootData that may be recursively crawled. Also, make the crawl_directories_start() from this function, since that's the next thing to do in every calling place.
* libtracker-miner: Fix possible leakCarlos Garnacho2017-11-141-1/+3
| | | | | If we hit some early return conditions, the RootData would be leaked.
* libtracker-miner: Pass parent to _insert_store_info()Carlos Garnacho2017-11-141-4/+14
| | | | | | | | | As both places doing this iterate directories one by one, we can optimize GFile interning by providing an already interned common parent. This eases the GNode lookups in TrackerFileSystem, as we already know the most direct parent GNode the file should have.
* libtracker-miner: Avoid interning file for monitoring purposesCarlos Garnacho2017-11-141-8/+3
| | | | | | It doesn't bring any gains to use interned files when adding directories to the TrackerMonitor. Just use the GFile we get and avoid interning the directory this soon.
* libtracker-miner: Small simplification on TrackerFileSystemCarlos Garnacho2017-11-141-50/+56
| | | | | | | | | | | | The implementation catered for GFiles being used from multiple TrackerFileSystem instances. This is clearly overkill as we most often have one (one miner per process) and even if there's multiple miners in the same process, the Gfile instances are not interchangeable. This can just go away, and we instead ensure to create a duplicate of the GFile if it actually belongs to another TrackerFileSystem, which again is extremely unlikely.
* libtracker-direct: Remove stray print()Carlos Garnacho2017-11-141-1/+0
|
* libtracker-miner: Remove TrackerSparqlBuilder sparql buffer tasksCarlos Garnacho2017-11-142-81/+10
| | | | | Those have been unused for a long time. We now only pass sparql around as strings.
* libtracker-miner: Remove bulk sparql buffer operationsCarlos Garnacho2017-11-142-189/+1
| | | | Those have been unused for quite some time now.
* libtracker-miner: Always use interned files when emitting ::file-deletedCarlos Garnacho2017-11-141-2/+10
| | | | | There were other places that didn't ensure that TrackerFileNotifier used interned files when emitting ::file-* signals.
* 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-143-41/+7
| | | | | | | | | 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.