summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Honour TRACKER_DB_ONTOLOGIES_DIR override more logicallysam/functional-testsSam Thursfield2018-07-161-7/+12
| | | | | | Previously, we would ignore this environment variable unless the installed directory didn't exist. This meant that one of the functional tests would stop working once you ran `make install`...
* Restore Unicode quotation marks in a translatable stringPiotr Drąg2018-07-151-1/+1
| | | | | | Fixes regression in commit b458fda8fa03f5ec53f8de9edfeef1b7610aae9c. See https://developer.gnome.org/hig/stable/typography.html
* Add support to TrackerResource for outputting metadata as JSON-LDsam/resource-jsonldSam Thursfield2018-07-157-2/+207
| | | | | This also adds `tracker extract -o json` to dump resources in JSON-LD, in anticipation of corresponding updates in tracker-miners.git.
* libtracker-miner: Warn when overwriting tasks in the task poolsam/tracker-miner-fs-test-fixesSam Thursfield2018-07-151-0/+11
| | | | | | | | | The TrackerTaskPool class and its subclass TrackerSparqlBuffer are designed to contain only one task for any given GFile. If multiple tasks are pushed for the same file some of them might not be executed. This leads to issues such as: https://gitlab.gnome.org/GNOME/tracker/issues/15
* libtracker-miner/tracker-miner-fs.c: Fix "Parent not indexed yet" errorsSam Thursfield2018-07-151-34/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Commit cef502e668a640 ("Add TrackerMinerFS::move-file vmethod") introduced a regression which sometimes led to errors like this: Tracker-FATAL-WARNING: Parent 'file:///tmp/tracker-miner-fs-test-77E2LZ/recursive/4' not indexed yet This was causing tracker-miner-fs-test to fail in some cases. TrackerTaskPool assumes that there is only one task in the pool per GFile. When processing item_move() operations this wasn't true because we'd create one task for removing the existing dest_file, and another task for updating the URL of source_file to point to dest_file. Both tasks would be associated with dest_file. If the SPARQL buffer was flushed after the first task was created and before the second task was created, the second task would overwrite the first task in the ->priv->tasks hash table, so when the first task completed, the second task would be removed from the task pool without ever executing. This would mean that the URL of source_file never got updated to point at dest_file, which triggered the "Parent not indexed yet" error later on.
* libtracker-miner/tracker-miner-fs.c: Rename item_move() parameterSam Thursfield2018-07-151-8/+8
|
* libtracker-miners-common: Improve error when domain rule isn't foundSam Thursfield2018-07-021-2/+8
| | | | | | | | | | | | Before: GLib-CRITICAL **: g_key_file_load_from_file: assertion 'file != NULL' failed CRITICAL **: Could not load domain ontology '(null)': Key file does not have group “DomainOntology” After: ERROR **: Unable to find default domain ontology rule /usr/local/share/tracker/domain-ontologies/default.rule
* meson: Add soversion information to the shared libraries that we installSam Thursfield2018-07-023-0/+4
| | | | This is needed so that Libtool will link against them correctly.
* meson: Expose tracker-store as a variableSam Thursfield2018-07-021-1/+1
| | | | | This allows projects that embed tracker as a subproject to access the variable.
* meson: Fix bundled FTS moduleSam Thursfield2018-06-301-1/+3
| | | | | | | The sqlite3_fts5_init() symbol was being discarded as nothing linked against it (it's loaded dynamically at runtime instead). Using link_whole instead of link_with fixes that.
* meson: Fix name of libtracker-ftsSam Thursfield2018-06-301-1/+1
| | | | The 'lib' prefix isn't necessary in the library() target name.
* libtracker-miner: Emit ::file-updated on file extension changesCarlos Garnacho2018-06-231-0/+25
| | | | | | | | | We have no access to past/current GFileInfos, so detect changes in file extensions to handle the cases where a change of filename results in the file having a different mimetype. In these cases, ::file-updated should be emitted, so it gets the right rdf:types as per its new mimetype.
* libtracker-miner: Transfer attribute updates information through the eventCarlos Garnacho2018-06-231-29/+21
| | | | | | | | | | | First, seems cleaner to do it this way, as GObject data has undefined lifetime (yes, as long as the object lives, but the TrackerFileSystem may cache those). But this also fixes an unintended side effect that "attribute only" updates take precedence over full updates, events themselves may be coalesced away, but data would remain. Actually it's the other way around, if we get a full update and an attributes-only update, we may discard the second.
* libtracker-miner: Emit TrackerDecorator::finished on 0 itemsCarlos Garnacho2018-06-231-3/+0
| | | | | If no items are found, ::finished is silenced away. Better to do this for consistency.
* libtracker-miner: Ignore root folder when crawling at placesCarlos Garnacho2018-06-211-18/+21
| | | | | | | | | | | | There's 2 situations where they may be avoided: 1) When crawling a new folder after it's been detected through TrackerMonitor, as ::file-created is emitted right away since commit 09408f1dcad. 2) When a directory is moved, as ::file-moved will be emitted for it in advance. In these situations it's wrong/undesirable to maybe emit ::file-created/-updated for those.
* libtracker-common: Drop automatic parser versioningCarlos Garnacho2018-06-219-59/+27
| | | | | | | | | | The TRACKER_PARSER_VERSION number must be bumped on every change to src/libtracker-common/tracker-parser*. This policy shall be enforced through a server-side update hook. This is a bit more cumbersome for the OTOH sparse changes to the parser, but friendlier to the meson build system, where we can't have build-generated files added to dist.
* 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.