diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2017-06-08 17:03:41 +0100 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2017-06-08 17:44:19 +0100 |
commit | 809b56767fccd5680136485c6fbbc895e83dd886 (patch) | |
tree | e60c05396c0f343ec19ba17e55599b74dfa4e1b2 | |
parent | 5b997a905f5d514e214080a9df4f158870444609 (diff) | |
download | tracker-809b56767fccd5680136485c6fbbc895e83dd886.tar.gz |
Remove Maemo/Meego leftovers
This removes various code paths that we believe to be unused.
* The userguides miner has been removed altogether.
* The application miner no longer parses MeeGo-style .desktop files
* The TRACKER_DISABLE_MEEGOTOUCH_LOCALE environment flag is gone
(it already did nothing)
* Character set detection with libmeegotouch is removed, only enca
or libicu are supported
* Meego-specific flags are gone from .desktop files
* Functional tests have lost their vestigal Scratchbox and Aegis support
There are 5 ontologies referencing Maemo, 4 of which are largely unused.
These have been kept around in case anyone is using them outside
Tracker.
https://bugzilla.gnome.org/show_bug.cgi?id=783555
55 files changed, 23 insertions, 1957 deletions
diff --git a/config.h.meson.in b/config.h.meson.in index 4294d8477..613511c3a 100644 --- a/config.h.meson.in +++ b/config.h.meson.in @@ -78,9 +78,6 @@ /* libunistring Unicode support library */ #mesondefine HAVE_LIBUNISTRING -/* Define if we have meegotouch */ -#mesondefine HAVE_MEEGOTOUCH - /* Define if we have NetworkManager for network status detection */ #mesondefine HAVE_NETWORK_MANAGER diff --git a/configure.ac b/configure.ac index ffdd7604c..3b6024a8a 100644 --- a/configure.ac +++ b/configure.ac @@ -213,7 +213,6 @@ GTK_REQUIRED=3.0.0 LIBXML2_REQUIRED=2.6 HAL_REQUIRED=0.5 UPOWER_REQUIRED=0.9.0 -MEEGOTOUCH_REQUIRED=0.20 POPPLER_REQUIRED=0.16.0 CAIRO_REQUIRED=1.0 LIBICU_REQUIRED=4.8.1.1 @@ -399,13 +398,6 @@ TRACKER_MINER_APPS_REQUIRED="glib-2.0 >= $GLIB_REQUIRED PKG_CHECK_MODULES(TRACKER_MINER_APPS, [$TRACKER_MINER_APPS_REQUIRED]) -# Check requirements for tracker-miner-user-guides -TRACKER_MINER_USER_GUIDES_REQUIRED="glib-2.0 >= $GLIB_REQUIRED - gio-unix-2.0 >= $GLIB_REQUIRED - libxml-2.0 >= $LIBXML2_REQUIRED" - -PKG_CHECK_MODULES(TRACKER_MINER_USER_GUIDES, [$TRACKER_MINER_USER_GUIDES_REQUIRED]) - # Check requirements for tracker-miner-evolution evolution_plugin_name="" @@ -631,7 +623,6 @@ if test "x$enable_minimal" = "xyes"; then enable_tracker_writeback=no enable_miner_fs=no enable_miner_apps=no - enable_miner_user_guides=no enable_miner_rss=no enable_miner_evolution=no enable_miner_thunderbird=no @@ -702,22 +693,6 @@ if test "$native_win32" = "yes" ; then fi #################################################################### -# Check if we should install Maemo/MeeGo specific ontologies -#################################################################### - -AC_ARG_ENABLE(maemo, - AS_HELP_STRING([--enable-maemo], - [enable maemo ontology [[default=no]]]), - [enable_maemo=$enableval], - [enable_maemo=no]) - -AM_CONDITIONAL(HAVE_MAEMO, test "x$enable_maemo" = "xyes") - -if test "x$enable_maemo" = "xyes" ; then - AC_DEFINE(HAVE_MAEMO, 1, [Define if we enable Maemo specific features]) -fi - -#################################################################### # Check if we should disable the journal #################################################################### @@ -1274,40 +1249,6 @@ fi AM_CONDITIONAL(HAVE_EXEMPI, test "x$have_exempi" = "xyes") -#################################################################### -# Check for tracker-miner-fs: meegotouch, for MeeGo desktop files -#################################################################### - -AC_ARG_ENABLE(meegotouch, - AS_HELP_STRING([--enable-meegotouch], - [enable libmeegotouch application extraction [[default=no]]]), - [enable_meegotouch=$enableval], - [enable_meegotouch=no]) - -if test "x$enable_meegotouch" != "xno"; then - PKG_CHECK_MODULES(MEEGOTOUCH, - [meegotouch >= $MEEGOTOUCH_REQUIRED], - [have_meegotouch=yes], - [have_meegotouch=no]) - - LIBTRACKER_COMMON_CFLAGS="$LIBTRACKER_COMMON_CFLAGS $MEEGOTOUCH_CFLAGS" - LIBTRACKER_COMMON_LIBS="$LIBTRACKER_COMMON_LIBS $MEEGOTOUCH_LIBS" - - LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $MEEGOTOUCH_CFLAGS" - LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $MEEGOTOUCH_LIBS" - - TRACKER_MINER_FS_CFLAGS="$TRACKER_MINER_FS_CFLAGS $MEEGOTOUCH_CFLAGS" - TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS $MEEGOTOUCH_LIBS" - - if test "x$have_meegotouch" = "xyes"; then - AC_DEFINE(HAVE_MEEGOTOUCH, [], [Define if we have meegotouch]) - fi -else - have_meegotouch="no (disabled)" -fi - -AM_CONDITIONAL(HAVE_MEEGOTOUCH, test "x$have_meegotouch" = "xyes") - ################################################################## # Check for tracker-miner-fs ################################################################## @@ -1409,32 +1350,6 @@ fi AM_CONDITIONAL(HAVE_TRACKER_MINER_APPS, test "x$have_tracker_miner_apps" = "xyes") ################################################################## -# Check for tracker-miner-user-guides -################################################################## - -have_tracker_miner_user_guides="yes" - -AC_ARG_ENABLE(miner_user_guides, - AS_HELP_STRING([--enable-miner-user-guides], - [enable User guides miner [[default=auto]]]), - [enable_miner_user_guides=$enableval], - [enable_miner_user_guides=auto]) - -enable_tracker_miner_user_guides=$enable_miner_user_guides - -if test "x$enable_tracker_miner_user_guides" = "xyes"; then - if test "x$have_tracker_miner_user_guides" != "xyes"; then - AC_MSG_ERROR([Could not find tracker-miner-user-guides dependencies ($TRACKER_MINER_USER_GUIDES_REQUIRED).]) - fi -else - if test "x$enable_tracker_miner_user_guides" = "xno"; then - have_tracker_miner_user_guides="no (disabled)" - fi -fi - -AM_CONDITIONAL(HAVE_TRACKER_MINER_USER_GUIDES, test "x$have_tracker_miner_user_guides" = "xyes") - -################################################################## # Check for tracker-miner-rss ################################################################## @@ -2664,7 +2579,6 @@ AC_CONFIG_FILES([ src/miners/fs/Makefile src/miners/apps/Makefile src/miners/rss/Makefile - src/miners/user-guides/Makefile src/ontologies/Makefile src/tracker-store/Makefile src/tracker/Makefile @@ -2813,10 +2727,9 @@ Feature Support: Data Miners / Writebacks: - FS (File System): $have_tracker_miner_fs (MeeGo support: $have_meegotouch) + FS (File System): $have_tracker_miner_fs Applications: $have_tracker_miner_apps RSS: $have_tracker_miner_rss - User Guides: $have_tracker_miner_user_guides Email: Evolution: $have_tracker_miner_evolution ($tracker_miner_evolution_install_dir) Thunderbird: $have_tracker_miner_thunderbird ($tracker_miner_thunderbird_install_dir) @@ -2871,8 +2784,6 @@ Applications: Frameworks / Options: Support GNOME's Nautilus $have_tracker_nautilus_extension ($tracker_nautilus_extension_install_dir) - Support Maemo $enable_maemo - Support libmeegotouch $have_meegotouch Support Guaranteed Metadata $enable_guarantee_metadata (e.g. guess nie:title from files) " diff --git a/docs/manpages/tracker-store.1 b/docs/manpages/tracker-store.1 index eb4eab764..77ecb177f 100644 --- a/docs/manpages/tracker-store.1 +++ b/docs/manpages/tracker-store.1 @@ -82,12 +82,6 @@ settings. The file is a \\n separated list of SQLite queries to execute on any newly created SQLite connection in tracker-store. .TP -.B TRACKER_DISABLE_MEEGOTOUCH_LOCALE -If Tracker is compiled with meegotouch locale management support, setting this -variable in the environment will disable retrieving the locale from GConf, and -the standard locale settings will be used instead. - -.TP .B TRACKER_USE_LOG_FILES Don't just log to stdout and stderr, but to log files too which are kept in $HOME/.local/share/tracker/. This came into effect in 0.15.3 diff --git a/docs/reference/libtracker-sparql/overview.sgml b/docs/reference/libtracker-sparql/overview.sgml index 586c1154d..400dca904 100644 --- a/docs/reference/libtracker-sparql/overview.sgml +++ b/docs/reference/libtracker-sparql/overview.sgml @@ -184,15 +184,6 @@ $ pkg-config --libs tracker-sparql-0.12 created SQLite connection in tracker-store. </para> </listitem> - <listitem> - <emphasis>TRACKER_DISABLE_MEEGOTOUCH_LOCALE</emphasis> - <para> - If Tracker is compiled with meegotouch locale management support, - setting this variable in the environment will disable retrieving - the locale from GConf, and the standard locale settings will be - used instead. - </para> - </listitem> </itemizedlist> </para> diff --git a/meson.build b/meson.build index 703351dd5..da221d880 100644 --- a/meson.build +++ b/meson.build @@ -56,7 +56,6 @@ libsoup = dependency('libsoup-2.4', version: '> 2.40', required: true) libtiff = dependency('libtiff-4', required: false) libxml2 = dependency('libxml-2.0', version: '> 2.6') libvorbis = dependency('vorbisfile', version: '> 0.22') -meegotouch = dependency('meegotouch', version: '> 0.20', required: false) nautilus_extension = dependency('libnautilus-extension', required: false) network_manager = dependency('libnm-glib', version: '> 0.8', required: false) poppler = dependency('poppler-glib', version: '> 0.16.0', required: false) @@ -194,21 +193,6 @@ if unicode_library_name == '' endif #################################################################### -# Check for tracker-miner-fs: meegotouch, for MeeGo desktop files -#################################################################### - -have_meegotouch = false -if get_option('meegotouch') != 'no' - meegotouch = dependency('meegotouch', version: '>= 0.20', required: false) - - if meegotouch.found() - have_meegotouch = true - elif get_option('meegotouch') == 'yes' - error('meegotouch support explicitly requested, but meegotouch library couldn\'t be found') - endif -endif - -#################################################################### # Check for tracker-miner-evolution #################################################################### @@ -441,7 +425,6 @@ conf.set('HAVE_LIBIPTCDATA', libiptcdata.found()) conf.set('HAVE_LIBMEDIAART', libmediaart.found()) conf.set('HAVE_LIBSTEMMER', have_libstemmer) conf.set('HAVE_LIBUNISTRING', unicode_library_name == 'unistring') -conf.set('HAVE_MEEGOTOUCH', have_meegotouch) conf.set('HAVE_NETWORK_MANAGER', network_manager.found()) conf.set('HAVE_UPOWER', battery_detection_library_name == 'upower') @@ -485,7 +468,6 @@ add_global_arguments('-D_LARGEFILE64_SOURCE', language: 'c') have_tracker_miner_fs = true have_tracker_miner_apps = true -have_tracker_miner_user_guides = true have_tracker_miner_rss = true have_tracker_miner_firefox = true have_tracker_extract = true @@ -551,11 +533,9 @@ summary = [ ' Cache media art ' + libmediaart.found().to_string(), ' Bash completion support: ' + bash_completion_dir, '\nData Miners / Writebacks:', - ' FS (File System): @0@ (MeeGo support: @1@)'.format( - have_tracker_miner_fs, have_meegotouch), + ' FS (File System): ' + have_tracker_miner_fs.to_string(), ' Applications: ' + have_tracker_miner_apps.to_string(), ' RSS: ' + have_tracker_miner_rss.to_string(), - ' User Guides: ' + have_tracker_miner_user_guides.to_string(), ' Email:', ' Evolution: @0@ (@1@)'.format( have_tracker_miner_evolution, tracker_miner_evolution_install_dir), @@ -617,8 +597,6 @@ summary += [ '\nFrameworks / Options:', ' Support Nautilus file manager @0@ (@1@)'.format( nautilus_extension.found().to_string(), tracker_nautilus_extension_install_dir), - ' Support Maemo false', - ' Support libmeegotouch ' + meegotouch.found().to_string(), ' Support Guaranteed Metadata ' + get_option('guarantee_metadata').to_string(), ] diff --git a/meson_options.txt b/meson_options.txt index 943b48ae6..1624c4afd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,8 +36,6 @@ option('generic_media_extractor', type: 'combo', choices: ['auto', 'gstreamer', description: 'Enables one of the (gstreamer, libav, auto) generic media extractor backends') option('gstreamer_backend', type: 'combo', choices: ['discoverer', 'gupnp'], value: 'discoverer', description: 'When GStreamer is used, this enables one of the (discoverer, gupnp) GStreamer backends') -option('meegotouch', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no', - description: 'Enable libmeegotouch application extraction') option('stemmer', type: 'combo', choices: ['auto', 'no', 'yes'], value: 'no', description: 'Enable stemming words while indexing') option('unicode_support', type: 'combo', choices: ['icu', 'unistring', 'auto'], value: 'auto', diff --git a/po/POTFILES.in b/po/POTFILES.in index 2d119108b..92030f063 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -24,9 +24,6 @@ src/miners/rss/org.freedesktop.Tracker1.Miner.RSS.service.in.in src/miners/rss/tracker-main.c src/miners/rss/tracker-miner-rss.c src/miners/rss/tracker-miner-rss.desktop.in.in -src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in -src/miners/user-guides/tracker-main.c -src/miners/user-guides/tracker-miner-user-guides.desktop.in.in src/plugins/evolution/org.freedesktop.Tracker1.Miner.EMails.service.in.in src/plugins/evolution/org-freedesktop-Tracker-evolution-plugin.eplug.xml src/plugins/evolution/tracker-evolution-plugin.c diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 1cbb71eac..798733bf1 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -14,7 +14,6 @@ src/tracker-status-icon/tracker-status-icon.desktop.in src/tracker-store/tracker-main.c src/tracker-store/tracker-store.desktop.in src/tracker-extract/tracker-extract.desktop.in -src/miners/user-guides/tracker-miner-user-guides.desktop.in src/miners/apps/tracker-miner-apps.desktop.in src/miners/fs/tracker-miner-fs.desktop.in src/miners/rss/tracker-miner-rss.desktop.in diff --git a/src/libtracker-common/tracker-locale.c b/src/libtracker-common/tracker-locale.c index 030f8beeb..20a513460 100644 --- a/src/libtracker-common/tracker-locale.c +++ b/src/libtracker-common/tracker-locale.c @@ -103,7 +103,6 @@ tracker_locale_init (void) { guint i; - /* Initialize those not retrieved from gconf, or if not in meegotouch */ for (i = 0; i < TRACKER_LOCALE_LAST; i++) { if (!current_locales[i]) { const gchar *env_locale = NULL; diff --git a/src/libtracker-data/tracker-collation.c b/src/libtracker-data/tracker-collation.c index 308f5ee41..b43ce9111 100644 --- a/src/libtracker-data/tracker-collation.c +++ b/src/libtracker-data/tracker-collation.c @@ -108,11 +108,6 @@ tracker_collation_init (void) /* Get locale! */ locale = tracker_locale_get (TRACKER_LOCALE_COLLATE); -#ifdef HAVE_MEEGOTOUCH - /* libmeegotouch ships modified ICU data */ - u_setDataDirectory ("/usr/share/meegotouch/icu"); -#endif - g_debug ("[ICU collation] Initializing collator for locale '%s'", locale); collator = ucol_open (locale, &status); if (!collator) { diff --git a/src/libtracker-extract/Makefile.am b/src/libtracker-extract/Makefile.am index dc7d6e37b..45f507c1c 100644 --- a/src/libtracker-extract/Makefile.am +++ b/src/libtracker-extract/Makefile.am @@ -56,12 +56,6 @@ libtracker_extract_la_SOURCES += \ tracker-encoding-enca.h endif -if HAVE_MEEGOTOUCH -libtracker_extract_la_SOURCES += \ - tracker-encoding-meegotouch.cpp \ - tracker-encoding-meegotouch.h -endif - if HAVE_LIBICU_CHARSET_DETECTION libtracker_extract_la_SOURCES += \ tracker-encoding-libicu.c \ diff --git a/src/libtracker-extract/meson.build b/src/libtracker-extract/meson.build index 96b6c8e44..2ecd9d125 100644 --- a/src/libtracker-extract/meson.build +++ b/src/libtracker-extract/meson.build @@ -16,10 +16,6 @@ elif charset_library_name == 'icu' libtracker_extract_sources += 'tracker-encoding-libicu.c' endif -if have_meegotouch - libtracker_extract_sources += 'tracker-encoding-meegotouch.cpp' -endif - tracker_extract_dependencies = [charset_library, gmodule] if exempi.found() diff --git a/src/libtracker-extract/tracker-encoding-meegotouch.cpp b/src/libtracker-extract/tracker-encoding-meegotouch.cpp deleted file mode 100644 index 6b881e735..000000000 --- a/src/libtracker-extract/tracker-encoding-meegotouch.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2011 Nokia <ivan.frade@nokia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" - -#include <MCharsetDetector> -#include <MCharsetMatch> - -#include <glib.h> -#include <libtracker-common/tracker-locale.h> -#include "tracker-encoding-meegotouch.h" - -/* - * See http://apidocs.meego.com/git-tip/mtf/class_m_charset_detector.html - */ - -gchar * -tracker_encoding_guess_meegotouch (const gchar *buffer, - gsize size) -{ - /* Initialize detector */ - MCharsetDetector detector ((const char *)buffer, (int)size); - gchar *locale; - gchar *encoding = NULL; - - if (detector.hasError ()) { - g_warning ("Charset detector error when creating: %s", - detector.errorString ().toUtf8 (). data ()); - return NULL; - } - - locale = tracker_locale_get (TRACKER_LOCALE_LANGUAGE); - detector.setDeclaredLocale (locale); - - MCharsetMatch bestMatch = detector.detect (); - - if (detector.hasError ()) { - g_warning ("Charset detector error when detecting: %s", - detector.errorString ().toUtf8 (). data ()); - g_free (locale); - return NULL; - } - - if (bestMatch.confidence () > 30) { - encoding = g_strdup (bestMatch.name ().toUtf8 ().data ()); - -#if 0 - QList<MCharsetMatch> mCharsetMatchList = detector.detectAll(); - - if (detector.hasError ()) { - g_warning ("Charset detector error when detecting all: %s", - detector.errorString ().toUtf8 (). data ()); - } - - g_debug ("Detecting all charsets..."); - for (gint i = 0; i < mCharsetMatchList.size (); ++i) { - g_debug (" Charset '%s' with %d%% confidence...", - mCharsetMatchList[i].name (). toUtf8 ().data (), - mCharsetMatchList[i].confidence ()); - } -#endif - - g_debug ("Guessing charset as '%s' with %d%% confidence", - encoding, bestMatch.confidence ()); - } else { - g_debug ("Ignoring charset as '%s' with %d%% (< 30%%) confidence", - bestMatch.name ().toUtf8 ().data (), - bestMatch.confidence ()); - } - - g_free (locale); - - return encoding; -} diff --git a/src/libtracker-extract/tracker-encoding-meegotouch.h b/src/libtracker-extract/tracker-encoding-meegotouch.h deleted file mode 100644 index 6b6a9696d..000000000 --- a/src/libtracker-extract/tracker-encoding-meegotouch.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2011 Nokia <ivan.frade@nokia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef __LIBTRACKER_EXTRACT_ENCODING_MEEGOTOUCH_H__ -#define __LIBTRACKER_EXTRACT_ENCODING_MEEGOTOUCH_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -G_GNUC_INTERNAL -gchar *tracker_encoding_guess_meegotouch (const gchar *buffer, - gsize size); - -G_END_DECLS - -#endif /* __LIBTRACKER_EXTRACT_ENCODING_MEEGOTOUCH_H__ */ diff --git a/src/libtracker-extract/tracker-encoding.c b/src/libtracker-extract/tracker-encoding.c index fe0b3429f..f01576773 100644 --- a/src/libtracker-extract/tracker-encoding.c +++ b/src/libtracker-extract/tracker-encoding.c @@ -26,10 +26,6 @@ #include "tracker-encoding-enca.h" #endif -#ifdef HAVE_MEEGOTOUCH -#include "tracker-encoding-meegotouch.h" -#endif - #ifdef HAVE_LIBICU_CHARSET_DETECTION #include "tracker-encoding-libicu.h" #endif @@ -37,7 +33,7 @@ gboolean tracker_encoding_can_guess (void) { -#if defined (HAVE_ENCA) || defined (HAVE_MEEGOTOUCH) || defined (HAVE_LIBICU_CHARSET_DETECTION) +#if defined (HAVE_ENCA) || defined (HAVE_LIBICU_CHARSET_DETECTION) return TRUE; #else return FALSE; @@ -52,13 +48,8 @@ tracker_encoding_guess (const gchar *buffer, gchar *encoding = NULL; gdouble conf = 1; -#ifdef HAVE_MEEGOTOUCH - encoding = tracker_encoding_guess_meegotouch (buffer, size); -#endif /* HAVE_MEEGOTOUCH */ - #ifdef HAVE_LIBICU_CHARSET_DETECTION - if (!encoding) - encoding = tracker_encoding_guess_icu (buffer, size, &conf); + encoding = tracker_encoding_guess_icu (buffer, size, &conf); #endif /* HAVE_LIBICU_CHARSET_DETECTION */ #ifdef HAVE_ENCA diff --git a/src/miners/Makefile.am b/src/miners/Makefile.am index ca32fb894..cbeba5430 100644 --- a/src/miners/Makefile.am +++ b/src/miners/Makefile.am @@ -12,8 +12,4 @@ if HAVE_TRACKER_MINER_RSS SUBDIRS += rss endif -if HAVE_TRACKER_MINER_USER_GUIDES -SUBDIRS += user-guides -endif - EXTRA_DIST = meson.build diff --git a/src/miners/apps/tracker-miner-applications.c b/src/miners/apps/tracker-miner-applications.c index 749d3e4d2..6f9260352 100644 --- a/src/miners/apps/tracker-miner-applications.c +++ b/src/miners/apps/tracker-miner-applications.c @@ -143,24 +143,6 @@ miner_applications_add_directories (TrackerMinerFS *fs) if (user_data_dir) { miner_applications_basedir_add (fs, user_data_dir); } - -#ifdef HAVE_MEEGOTOUCH - /* NOTE: We don't use miner_applications_basedir_add() for - * this location because it is unique to MeeGoTouch. - */ - path = "/usr/lib/duicontrolpanel/"; - indexing_tree = tracker_miner_fs_get_indexing_tree (fs); - - g_message ("Setting up applications to iterate from MeegoTouch directories"); - g_message (" Adding:'%s'", path); - - file = g_file_new_for_path (path); - tracker_indexing_tree_add (indexing_tree, file, - TRACKER_DIRECTORY_FLAG_RECURSE | - TRACKER_DIRECTORY_FLAG_MONITOR | - TRACKER_DIRECTORY_FLAG_CHECK_MTIME); - g_object_unref (file); -#endif /* HAVE_MEEGOTOUCH */ } static void @@ -199,7 +181,7 @@ miner_finished_cb (TrackerMinerFS *fs, /* If a reset is requested, we will remove from the store all items previously * inserted by the tracker-miner-applications, this is: * (a) all elements which are nfo:softwareIcon of a given nfo:Software - * (b) all nfo:Software in our graph (includes both applications and maemo applets) + * (b) all nfo:Software in our graph * (c) all elements which are nfo:softwareCategoryIcon of a given nfo:SoftwareCategory * (d) all nfo:SoftwareCategory in our graph */ @@ -227,7 +209,7 @@ miner_applications_reset (TrackerMiner *miner) tracker_sparql_builder_object_variable (sparql, "software"); tracker_sparql_builder_where_close (sparql); - /* (b) all nfo:Software in our graph (includes both applications and maemo applets) */ + /* (b) all nfo:Software in our graph */ tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN); tracker_sparql_builder_subject_variable (sparql, "software"); tracker_sparql_builder_predicate (sparql, "a"); @@ -520,10 +502,6 @@ process_desktop_file (ProcessApplicationData *data, gboolean is_software = TRUE; const gchar *parent_urn; gchar *lang; -#ifdef HAVE_MEEGOTOUCH - gchar *logical_id = NULL; - gchar *translation_catalog = NULL; -#endif /* HAVE_MEEGOTOUCH */ sparql = data->sparql; key_file = data->key_file; @@ -544,19 +522,6 @@ process_desktop_file (ProcessApplicationData *data, /* NOTE: We sanitize categories later on when iterating them */ -#ifdef HAVE_MEEGOTOUCH - /* If defined, start with the logical strings */ - logical_id = g_key_file_get_string (key_file, GROUP_DESKTOP_ENTRY, "X-MeeGo-Logical-Id", NULL); - translation_catalog = g_key_file_get_string (key_file, GROUP_DESKTOP_ENTRY, "X-MeeGo-Translation-Catalog", NULL); - - if (logical_id && translation_catalog) { - name = tracker_meego_translate (translation_catalog, logical_id); - } - - g_free (logical_id); - g_free (translation_catalog); -#endif /* HAVE_MEEGOTOUCH */ - if (!name) { /* Try to get the name with our desired LANG locale... */ name = g_key_file_get_locale_string (key_file, GROUP_DESKTOP_ENTRY, "Name", lang, NULL); @@ -648,63 +613,6 @@ process_desktop_file (ProcessApplicationData *data, g_warning ("Invalid desktop file: '%s'", uri); g_warning (" Type 'Link' requires a URL"); } -#ifdef HAVE_MEEGOTOUCH - } else if (name && g_ascii_strcasecmp (type, "ControlPanelApplet") == 0) { - /* Special case control panel applets */ - /* The URI of the InformationElement should be a UUID URN */ - uri = g_file_get_uri (data->file); - tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN); - - tracker_sparql_builder_subject_iri (sparql, APPLET_DATASOURCE_URN); - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nie:DataSource"); - - /* TODO This is atm specific for Maemo */ - tracker_sparql_builder_subject_iri (sparql, uri); - - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "maemo:ControlPanelApplet"); - - tracker_sparql_builder_predicate (sparql, "nie:dataSource"); - tracker_sparql_builder_object_iri (sparql, APPLET_DATASOURCE_URN); - - /* This matches SomeApplet as Type= */ - } else if (name && g_str_has_suffix (type, "Applet")) { - /* The URI of the InformationElement should be a UUID URN */ - uri = g_file_get_uri (data->file); - tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN); - - tracker_sparql_builder_subject_iri (sparql, APPLET_DATASOURCE_URN); - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nie:DataSource"); - - /* TODO This is atm specific for Maemo */ - tracker_sparql_builder_subject_iri (sparql, uri); - - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "maemo:SoftwareApplet"); - - tracker_sparql_builder_predicate (sparql, "nie:dataSource"); - tracker_sparql_builder_object_iri (sparql, APPLET_DATASOURCE_URN); - - } else if (name && g_ascii_strcasecmp (type, "DUIApplication") == 0) { - - uri = g_file_get_uri (data->file); - tracker_sparql_builder_insert_silent_open (sparql, TRACKER_MINER_FS_GRAPH_URN); - - tracker_sparql_builder_subject_iri (sparql, APPLICATION_DATASOURCE_URN); - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nie:DataSource"); - - tracker_sparql_builder_subject_iri (sparql, uri); - - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nfo:SoftwareApplication"); - tracker_sparql_builder_object (sparql, "nie:DataObject"); - - tracker_sparql_builder_predicate (sparql, "nie:dataSource"); - tracker_sparql_builder_object_iri (sparql, APPLICATION_DATASOURCE_URN); -#endif /* HAVE_MEEGOTOUCH */ } else { /* Invalid type, all valid types are already listed above */ uri = g_file_get_uri (data->file); @@ -733,11 +641,7 @@ process_desktop_file (ProcessApplicationData *data, /* If we didn't get a name, the problem is more severe as we don't default it * to anything, so we g_warning() it. */ g_warning ("Invalid desktop file: '%s'", uri); -#ifdef HAVE_MEEGOTOUCH - g_warning (" Couldn't get name, missing or wrong key (X-MeeGo-Logical-Id, X-MeeGo-Translation-Catalog or Name)"); -#else g_warning (" Couldn't get name, missing key (Name)"); -#endif } } @@ -759,8 +663,8 @@ process_desktop_file (ProcessApplicationData *data, tracker_sparql_builder_object_boolean (sparql, TRUE); */ /* We should always always have a proper name if the desktop file is correct - * w.r.t to the Meego or Freedesktop specs, but sometimes this is not true, - * so instead of passing wrong stuff to the SPARQL builder, we avoid it. + * w.r.t to the Freedesktop specs, but sometimes this is not true, so + * instead of passing wrong stuff to the SPARQL builder, we avoid it. * If we don't have a proper name, we already warned it before. */ if (name) { tracker_sparql_builder_predicate (sparql, "nie:title"); diff --git a/src/miners/apps/tracker-miner-apps.desktop.in.in b/src/miners/apps/tracker-miner-apps.desktop.in.in index 0c49814b1..12b49ea5f 100644 --- a/src/miners/apps/tracker-miner-apps.desktop.in.in +++ b/src/miners/apps/tracker-miner-apps.desktop.in.in @@ -6,13 +6,12 @@ Exec=@libexecdir@/tracker-miner-apps Terminal=false Type=Application Categories=Utility; -X-Meego-Priority=Late X-GNOME-Autostart-enabled=true X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true -OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Miners diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c index f40ff5c68..4e2f607f9 100644 --- a/src/miners/fs/tracker-main.c +++ b/src/miners/fs/tracker-main.c @@ -647,8 +647,8 @@ miner_needs_check (TrackerMiner *miner, } /* FIXME: We currently don't check the applications - * miner OR the userguides miner if we are finished - * before returning TRUE/FALSE here, should we? + * miner if we are finished before returning TRUE/FALSE here, should + * we? */ /* We consider the miner finished */ diff --git a/src/miners/fs/tracker-miner-fs.desktop.in.in b/src/miners/fs/tracker-miner-fs.desktop.in.in index a1620f6ba..29d5364c6 100644 --- a/src/miners/fs/tracker-miner-fs.desktop.in.in +++ b/src/miners/fs/tracker-miner-fs.desktop.in.in @@ -6,13 +6,12 @@ Exec=@libexecdir@/tracker-miner-fs Terminal=false Type=Application Categories=Utility; -X-Meego-Priority=Late X-GNOME-Autostart-enabled=true X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true -OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Miners diff --git a/src/miners/meson.build b/src/miners/meson.build index 605c7ec61..d9384109d 100644 --- a/src/miners/meson.build +++ b/src/miners/meson.build @@ -1,4 +1,3 @@ subdir('fs') subdir('rss') subdir('apps') -subdir('user-guides') diff --git a/src/miners/user-guides/.gitignore b/src/miners/user-guides/.gitignore deleted file mode 100644 index 53909a707..000000000 --- a/src/miners/user-guides/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -tracker-miner-user-guides -*.service diff --git a/src/miners/user-guides/Makefile.am b/src/miners/user-guides/Makefile.am deleted file mode 100644 index 651767369..000000000 --- a/src/miners/user-guides/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -AM_CPPFLAGS = \ - $(BUILD_CFLAGS) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -DSHAREDIR=\""$(datadir)"\" \ - -DLOCALEDIR=\""$(localedir)"\" \ - -DLIBEXEC_PATH=\""$(libexecdir)"\" \ - $(TRACKER_MINER_USER_GUIDES_CFLAGS) - -libexec_PROGRAMS = tracker-miner-user-guides - -tracker_miner_user_guides_SOURCES = \ - tracker-main.c \ - tracker-miner-user-guides.c \ - tracker-miner-user-guides.h - -tracker_miner_user_guides_LDADD = \ - $(top_builddir)/src/libtracker-miner/libtracker-miner-@TRACKER_API_VERSION@.la \ - $(top_builddir)/src/libtracker-sparql-backend/libtracker-sparql-@TRACKER_API_VERSION@.la \ - $(top_builddir)/src/libtracker-common/libtracker-common.la \ - $(BUILD_LIBS) \ - $(TRACKER_MINER_USER_GUIDES_LIBS) - -# DBus interfaces (XML files) and services -%.service.in: %.service.in.in - @sed -e "s|@libexecdir[@]|${libexecdir}|" $< > $@ - -servicedir = $(DBUS_SERVICES_DIR) -service_DATA = org.freedesktop.Tracker1.Miner.Userguides.service - -INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u' -@INTLTOOL_SERVICE_RULE@ - -tracker-miner-user-guides.service: tracker-miner-user-guides.service.in Makefile - @sed -e "s|@libexecdir[@]|${libexecdir}|" $< > $@ - -systemd_userdir = $(prefix)/lib/systemd/user -systemd_user_DATA = tracker-miner-user-guides.service - -install-data-hook: - $(MKDIR_P) "$(DESTDIR)$(datadir)/tracker/miners" && \ - $(LN_S) -f "$(servicedir)/$(service_DATA)" \ - "$(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)" - -uninstall-local: - $(RM) "$(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)" && \ - $(RM) "$(servicedir)/$(service_DATA)" - -# Desktop files: First we fix the VERSION and libexecdir -%.desktop.in: %.desktop.in.in - @sed -e "s|@libexecdir[@]|${libexecdir}|" \ - -e "s|@VERSION[@]|${VERSION}|" $< > $@ - -autostartdir = $(sysconfdir)/xdg/autostart -autostart_DATA = tracker-miner-user-guides.desktop - -@INTLTOOL_DESKTOP_RULE@ - -# Dist / Clean rules for all data -CLEANFILES = \ - $(autostart_DATA) \ - $(autostart_DATA:.desktop=.desktop.in) \ - $(service_DATA) \ - $(service_DATA:.service=.service.in) \ - $(systemd_user_DATA) \ - $(NULL) - -EXTRA_DIST = \ - $(autostart_DATA:.desktop=.desktop.in.in) \ - $(service_DATA:.service=.service.in.in) \ - $(systemd_user_DATA:.service=.service.in) \ - meson.build \ - $(NULL) diff --git a/src/miners/user-guides/meson.build b/src/miners/user-guides/meson.build deleted file mode 100644 index 05bbf1d83..000000000 --- a/src/miners/user-guides/meson.build +++ /dev/null @@ -1,45 +0,0 @@ -sources = [ - 'tracker-main.c', - 'tracker-miner-user-guides.c', -] - -executable('tracker-miner-user-guides', sources, - dependencies: [libxml2, tracker_common_dep, tracker_miner_dep, tracker_sparql_dep], - c_args: [ '-DTRACKER_COMPILATION', ], - install: true, - install_dir: get_option('libexecdir'), - install_rpath: tracker_internal_libs_dir, -) - -dbus_service_file_untranslated = configure_file( - input: 'org.freedesktop.Tracker1.Miner.Userguides.service.in.in', - output: 'org.freedesktop.Tracker1.Miner.Userguides.service.in', - configuration: conf) - -dbus_service_file = custom_target('tracker-miner-user-guides-dbus-service-file', - input: dbus_service_file_untranslated, - output: 'org.freedesktop.Tracker1.Miner.Userguides.service', - command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 'po'), '@INPUT@', '@OUTPUT@'], - install: true, - install_dir: dbus_services_dir) - -desktop_file_untranslated = configure_file( - input: 'tracker-miner-user-guides.desktop.in.in', - output: 'tracker-miner-user-guides.desktop.in', - configuration: conf) - -desktop_file = custom_target('tracker-miner-user-guides-desktop-file', - input: desktop_file_untranslated, - output: 'tracker-miner-user-guides.desktop', - command: ['intltool-merge', '--quiet', '--desktop-style', '--utf8', join_paths(meson.source_root(), 'po'), '@INPUT@', '@OUTPUT@'], - install: true, - install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart')) - -if install_systemd_user_services - configure_file( - input: 'tracker-miner-user-guides.service.in', - output: 'tracker-miner-user-guides.service', - configuration: conf, - install: true, - install_dir: systemd_user_services_dir) -endif diff --git a/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in b/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in deleted file mode 100644 index 047ed0fd7..000000000 --- a/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in +++ /dev/null @@ -1,9 +0,0 @@ -[D-BUS Service] -Name=org.freedesktop.Tracker1.Miner.Userguides -Exec=@libexecdir@/tracker-miner-user-guides -SystemdService=tracker-miner-user-guides.service - -# Miner details needed for tracker-control -Path=/org/freedesktop/Tracker1/Miner/Userguides -_DisplayName=Userguides -_Comment=Userguide data miner diff --git a/src/miners/user-guides/tracker-main.c b/src/miners/user-guides/tracker-main.c deleted file mode 100644 index b375165a8..000000000 --- a/src/miners/user-guides/tracker-main.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (C) 2014, Lanedo GmbH. <martyn@lanedo.com> - - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "config.h" - -#include <stdlib.h> -#include <locale.h> -#include <errno.h> - -#include <glib.h> -#include <glib-unix.h> -#include <glib-object.h> -#include <glib/gi18n.h> - -#include <libtracker-common/tracker-common.h> - -#include <libtracker-miner/tracker-miner.h> - -#include "tracker-miner-user-guides.h" - -#define ABOUT \ - "Tracker " PACKAGE_VERSION "\n" - -#define LICENSE \ - "This program is free software and comes without any warranty.\n" \ - "It is licensed under version 2 or later of the General Public " \ - "License which can be viewed at:\n" \ - "\n" \ - " http://www.gnu.org/licenses/gpl.txt\n" - -static GMainLoop *main_loop; - -static gint verbosity = -1; -static gboolean no_daemon; -static gboolean version; - -static GOptionEntry entries[] = { - { "verbosity", 'v', 0, - G_OPTION_ARG_INT, &verbosity, - N_("Logging, 0 = errors only, " - "1 = minimal, 2 = detailed and 3 = debug (default=0)"), - NULL }, - { "no-daemon", 'n', 0, - G_OPTION_ARG_NONE, &no_daemon, - N_("Runs until all applications are indexed and then exits"), - NULL }, - { "version", 'V', 0, - G_OPTION_ARG_NONE, &version, - N_("Displays version information"), - NULL }, - { NULL } -}; - -static gboolean -signal_handler (gpointer user_data) -{ - int signo = GPOINTER_TO_INT (user_data); - - static gboolean in_loop = FALSE; - - /* Die if we get re-entrant signals handler calls */ - if (in_loop) { - _exit (EXIT_FAILURE); - } - - switch (signo) { - case SIGTERM: - case SIGINT: - in_loop = TRUE; - g_main_loop_quit (main_loop); - - /* Fall through */ - default: - if (g_strsignal (signo)) { - g_print ("\n"); - g_print ("Received signal:%d->'%s'\n", - signo, - g_strsignal (signo)); - } - break; - } - - return G_SOURCE_CONTINUE; -} - -static void -initialize_signal_handler (void) -{ -#ifndef G_OS_WIN32 - g_unix_signal_add (SIGTERM, signal_handler, GINT_TO_POINTER (SIGTERM)); - g_unix_signal_add (SIGINT, signal_handler, GINT_TO_POINTER (SIGINT)); -#endif /* G_OS_WIN32 */ -} - -static void -initialize_priority_and_scheduling (TrackerSchedIdle sched_idle, - gboolean first_time_index) -{ - /* Set CPU priority */ - if (sched_idle == TRACKER_SCHED_IDLE_ALWAYS || - (sched_idle == TRACKER_SCHED_IDLE_FIRST_INDEX && first_time_index)) { - tracker_sched_idle (); - } - - /* Set disk IO priority and scheduling */ - tracker_ioprio_init (); - - /* Set process priority: - * The nice() function uses attribute "warn_unused_result" and - * so complains if we do not check its returned value. But it - * seems that since glibc 2.2.4, nice() can return -1 on a - * successful call so we have to check value of errno too. - * Stupid... - */ - - g_message ("Setting priority nice level to 19"); - - errno = 0; - if (nice (19) == -1 && errno != 0) { - const gchar *str = g_strerror (errno); - - g_message ("Couldn't set nice value to 19, %s", - str ? str : "no error given"); - } -} - -static void -miner_finished_cb (TrackerMinerFS *fs, - gdouble seconds_elapsed, - guint total_directories_found, - guint total_directories_ignored, - guint total_files_found, - guint total_files_ignored, - gpointer user_data) -{ - g_info ("Finished mining in seconds:%f, total directories:%d, total files:%d", - seconds_elapsed, - total_directories_found, - total_files_found); - - if (no_daemon && main_loop) { - g_main_loop_quit (main_loop); - } -} - -static gboolean -miner_start_cb (gpointer user_data) -{ - TrackerMiner *miner = user_data; - - initialize_signal_handler (); - - tracker_miner_start (miner); - - return FALSE; -} - -int -main (gint argc, gchar *argv[]) -{ - TrackerMiner *miner_user_guides; - GOptionContext *context; - GError *error = NULL; - gchar *log_filename = NULL; - - main_loop = NULL; - - setlocale (LC_ALL, ""); - - bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - textdomain (GETTEXT_PACKAGE); - - /* Set timezone info */ - tzset (); - - /* Translators: this messagge will apper immediately after the - * usage string - Usage: COMMAND <THIS_MESSAGE> - */ - context = g_option_context_new (_("— start the user guides data miner")); - - g_option_context_add_main_entries (context, entries, NULL); - g_option_context_parse (context, &argc, &argv, &error); - g_option_context_free (context); - - if (error) { - g_printerr ("%s\n", error->message); - g_error_free (error); - return EXIT_FAILURE; - } - - if (version) { - g_print ("\n" ABOUT "\n" LICENSE "\n"); - return EXIT_SUCCESS; - } - - tracker_log_init (verbosity, &log_filename); - if (log_filename) { - g_message ("Using log file:'%s'", log_filename); - g_free (log_filename); - } - - /* This makes sure we don't steal all the system's resources */ - initialize_priority_and_scheduling (TRACKER_SCHED_IDLE_ALWAYS, FALSE); - - main_loop = g_main_loop_new (NULL, FALSE); - - g_message ("Checking if we're running as a daemon:"); - g_message (" %s %s", - no_daemon ? "No" : "Yes", - no_daemon ? "(forced by command line)" : ""); - - /* Create miner for userguides */ - miner_user_guides = tracker_miner_userguides_new (&error); - if (!miner_user_guides) { - g_critical ("Couldn't create new user guides miner, '%s'", - error ? error->message : "unknown error"); - tracker_log_shutdown (); - return EXIT_FAILURE; - } - - tracker_miner_fs_set_mtime_checking (TRACKER_MINER_FS (miner_user_guides), TRUE); - - g_signal_connect (miner_user_guides, "finished", - G_CALLBACK (miner_finished_cb), - NULL); - - /* Go, go, go! */ - g_idle_add (miner_start_cb, miner_user_guides); - g_main_loop_run (main_loop); - - g_message ("Shutdown started"); - - g_main_loop_unref (main_loop); - g_object_unref (G_OBJECT (miner_user_guides)); - - tracker_log_shutdown (); - - g_print ("\nOK\n\n"); - - return EXIT_SUCCESS; -} diff --git a/src/miners/user-guides/tracker-miner-user-guides.c b/src/miners/user-guides/tracker-miner-user-guides.c deleted file mode 100644 index 7aa4af12e..000000000 --- a/src/miners/user-guides/tracker-miner-user-guides.c +++ /dev/null @@ -1,804 +0,0 @@ -/* - * Copyright (C) 2011, Nokia <ivan.frade@nokia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Martyn Russell <martyn@lanedo.com> - */ - -#include "config.h" - -#include <libxml/HTMLparser.h> - -#include <libtracker-common/tracker-common.h> - -#include "tracker-miner-user-guides.h" - -#define LOCALE_FILENAME "locale-for-miner-user-guides.txt" - -// FIXME: get this value from tracker conf -#define MAX_EXTRACT_SIZE 1024 * 1024 // 1 MiB -#define MAX_TITLE_LENGTH 1000 - -typedef struct { - gchar *uri; - GString *title; - gboolean in_text; - gboolean in_title; - GString *plain_text; - gssize max_length; -} ParserContext; - -typedef struct { - TrackerMinerFS *miner; - GFile *file; - TrackerSparqlBuilder *sparql; - GCancellable *cancellable; - gchar *type; -} ProcessUserguideData; - -static void miner_userguides_initable_iface_init (GInitableIface *iface); -static gboolean miner_userguides_initable_init (GInitable *initable, - GCancellable *cancellable, - GError **error); -static gboolean miner_userguides_process_file (TrackerMinerFS *fs, - GFile *file, - TrackerSparqlBuilder *sparql, - GCancellable *cancellable); -static gboolean miner_userguides_process_file_attributes (TrackerMinerFS *fs, - GFile *file, - TrackerSparqlBuilder *sparql, - GCancellable *cancellable); -static void parser_get_file_content (const gchar *uri, - gssize max_extract_size, - gchar **content, - gchar **title); - -static GQuark miner_userguides_error_quark = 0; - -static GInitableIface* miner_userguides_initable_parent_iface; - -G_DEFINE_TYPE_WITH_CODE (TrackerMinerUserguides, tracker_miner_userguides, TRACKER_TYPE_MINER_FS, - G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, - miner_userguides_initable_iface_init)); - -static void -tracker_miner_userguides_class_init (TrackerMinerUserguidesClass *klass) -{ - TrackerMinerFSClass *miner_fs_class = TRACKER_MINER_FS_CLASS (klass); - - miner_fs_class->process_file = miner_userguides_process_file; - miner_fs_class->process_file_attributes = miner_userguides_process_file_attributes; - - miner_userguides_error_quark = g_quark_from_static_string ("TrackerMinerUserguides"); -} - -static void -tracker_miner_userguides_init (TrackerMinerUserguides *ma) -{ -} - -static void -miner_userguides_initable_iface_init (GInitableIface *iface) -{ - miner_userguides_initable_parent_iface = g_type_interface_peek_parent (iface); - iface->init = miner_userguides_initable_init; -} - -static inline gboolean -miner_userguides_basedir_add_path (TrackerMinerFS *fs, - const gchar *path, - const gchar *locale) -{ - if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { - TrackerIndexingTree *indexing_tree; - GFile *file; - - indexing_tree = tracker_miner_fs_get_indexing_tree (fs); - - g_message (" Adding:'%s'", path); - file = g_file_new_for_path (path); - tracker_indexing_tree_add (indexing_tree, file, - TRACKER_DIRECTORY_FLAG_RECURSE | - TRACKER_DIRECTORY_FLAG_MONITOR | - TRACKER_DIRECTORY_FLAG_CHECK_MTIME); - g_object_unref (file); - - return TRUE; - } - - g_message (" No user guide found for locale:'%s' in this prefix", locale); - - return FALSE; -} - -static void -miner_userguides_basedir_add (TrackerMinerFS *fs, - const gchar *basedir) -{ - gchar *path; - gboolean added = FALSE; - - /* Do preliminary check on basedir */ - path = g_build_filename (basedir, "userguide", "contents", NULL); - if (!g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { - g_message (" No user guides in prefix:'%s'", path); - g_free (path); - return; - } - - g_free (path); - - /* Without MeeGoTouch, we simply index ALL content. */ -#ifdef HAVE_MEEGOTOUCH - gchar *locale; - - locale = tracker_meego_get_locale (); - - /* Order of which we try here: - * 1, make sure locale is set, otherwise default to 'en' - * 2, try the "xx_YY" of the current locale - * 3, try the "xx" of the current locale - * 4, default to 'en' for cases where current locale has no userguide - */ - - /* Step 1 */ - if (locale == NULL || *locale == '\0') { - g_message (" Locale was not set which is unexpected, defaulting to 'en'"); - g_free (locale); - locale = g_strdup ("en"); - } - - /* Step 2 */ - path = g_build_filename (basedir, "userguide", "contents", locale, NULL); - added = miner_userguides_basedir_add_path (fs, path, locale); - g_free (path); - - /* Step 3 */ - if (!added && strlen (locale) > 2) { - locale[2] = '\0'; - path = g_build_filename (basedir, "userguide", "contents", locale, NULL); - added = miner_userguides_basedir_add_path (fs, path, locale); - g_free (path); - } - - /* Step 4 */ - if (!added) { - g_message (" Locale has no user guide currently, defaulting to 'en'"); - path = g_build_filename (basedir, "userguide", "contents", "en", NULL); - added = miner_userguides_basedir_add_path (fs, path, "en"); - g_free (path); - } - - if (!added) { - g_message (" Default locale 'en' has no user guide in this prefix"); - } - - g_free (locale); -#endif /* HAVE_MEEGOTOUCH */ - - if (!added) { - /* Add $dir/userguide/contents */ - g_message (" MeeGoTouch is disabled, indexing all user guides..."); - path = g_build_filename (basedir, "userguide", "contents", NULL); - miner_userguides_basedir_add_path (fs, path, ""); - g_free (path); - } -} - -static void -miner_userguides_add_directories (TrackerMinerFS *fs) -{ - const gchar * const *xdg_dirs; - gint i; - - g_message ("Setting up user guides to iterate from XDG system directories"); - - /* Add all XDG system and local dirs */ - xdg_dirs = g_get_system_data_dirs (); - - for (i = 0; xdg_dirs[i]; i++) { - miner_userguides_basedir_add (fs, xdg_dirs[i]); - } -} - -static void -miner_finished_cb (TrackerMinerFS *fs, - gdouble seconds_elapsed, - guint total_directories_found, - guint total_directories_ignored, - guint total_files_found, - guint total_files_ignored, - gpointer user_data) -{ - /* Save locale, if it changes the variation in the desktop - * file languages needs to be re-indexed. - */ - GError *error = NULL; - gchar *locale = tracker_locale_get (TRACKER_LOCALE_LANGUAGE); - gchar *locale_file = g_build_filename (g_get_user_cache_dir (), "tracker", LOCALE_FILENAME, NULL); - - g_message ("Saving locale used to index applications"); - g_message (" Creating locale file '%s'", locale_file); - - if (locale == NULL) { - locale = g_strdup (""); - } - - if (!g_file_set_contents (locale_file, locale, -1, &error)) { - g_message (" Could not set file contents, %s", - error ? error->message : "no error given"); - g_clear_error (&error); - } - - g_free (locale); - g_free (locale_file); -} - -/* If a reset is requested, we will remove from the store all items previously - * inserted by the tracker-miner-userguides, this is: - * (a) Remove all resources which are a nfo:HelpDocument - * (b) Remove all unnecessary directories - */ -static void -miner_userguides_reset (TrackerMiner *miner) -{ - GError *error = NULL; - TrackerSparqlBuilder *sparql; - - sparql = tracker_sparql_builder_new_update (); - - /* (a) Remove all resources which are a nfo:HelpDocument */ - tracker_sparql_builder_delete_open (sparql, TRACKER_OWN_GRAPH_URN); - tracker_sparql_builder_subject_variable (sparql, "userguide"); - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "rdfs:Resource"); - tracker_sparql_builder_delete_close (sparql); - - tracker_sparql_builder_where_open (sparql); - tracker_sparql_builder_subject_variable (sparql, "userguide"); - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nfo:HelpDocument"); - tracker_sparql_builder_where_close (sparql); - - /* (b) Remove all unnecessary directories */ - /* TODO: Finish */ - - - /* Execute a sync update, we don't want the userguides miner to start before - * we finish this. */ - tracker_sparql_connection_update (tracker_miner_get_connection (miner), - tracker_sparql_builder_get_result (sparql), - G_PRIORITY_HIGH, - NULL, - &error); - - if (error) { - /* Some error happened performing the query, not good */ - g_critical ("Couldn't reset mined userguides: %s", - error ? error->message : "unknown error"); - g_error_free (error); - } - - g_object_unref (sparql); -} - -static gboolean -detect_locale_changed (TrackerMiner *miner) -{ - gchar *locale_file; - gchar *previous_locale = NULL; - gchar *current_locale; - gboolean changed; - - locale_file = g_build_filename (g_get_user_cache_dir (), "tracker", LOCALE_FILENAME, NULL); - - if (G_LIKELY (g_file_test (locale_file, G_FILE_TEST_EXISTS))) { - gchar *contents; - - /* Check locale is correct */ - if (G_LIKELY (g_file_get_contents (locale_file, &contents, NULL, NULL))) { - if (contents && - contents[0] == '\0') { - g_critical (" Empty locale file found at '%s'", locale_file); - g_free (contents); - } else { - /* Re-use contents */ - previous_locale = contents; - } - } else { - g_critical (" Could not get content of file '%s'", locale_file); - } - } else { - g_message (" Could not find locale file:'%s'", locale_file); - } - - g_free (locale_file); - - current_locale = tracker_locale_get (TRACKER_LOCALE_LANGUAGE); - - /* Note that having both to NULL is actually valid, they would default - * to the unicode collation without locale-specific stuff. */ - if (g_strcmp0 (previous_locale, current_locale) != 0) { - g_message ("Locale change detected from '%s' to '%s'...", - previous_locale, current_locale); - changed = TRUE; - } else { - g_message ("Current and previous locales match: '%s'", previous_locale); - changed = FALSE; - } - - g_free (current_locale); - g_free (previous_locale); - - if (changed) { - g_message ("Locale change detected, so resetting miner to " - "remove all previously created items..."); - miner_userguides_reset (miner); - } - - return changed; -} - -static gboolean -miner_userguides_initable_init (GInitable *initable, - GCancellable *cancellable, - GError **error) -{ - TrackerMinerFS *fs; - GError *inner_error = NULL; - TrackerIndexingTree *indexing_tree; - - fs = TRACKER_MINER_FS (initable); - indexing_tree = tracker_miner_fs_get_indexing_tree (fs); - - /* Set up files filter, deny every file, but - * those with a .desktop/directory extension - */ - tracker_indexing_tree_set_default_policy (indexing_tree, - TRACKER_FILTER_FILE, - TRACKER_FILTER_POLICY_DENY); - tracker_indexing_tree_add_filter (indexing_tree, - TRACKER_FILTER_FILE, - "*.html"); - - /* Chain up parent's initable callback before calling child's one */ - if (!miner_userguides_initable_parent_iface->init (initable, cancellable, &inner_error)) { - g_propagate_error (error, inner_error); - return FALSE; - } - - g_signal_connect (fs, "finished", - G_CALLBACK (miner_finished_cb), - NULL); - - miner_userguides_add_directories (fs); - - /* If the locales changed, we need to reset things first */ - detect_locale_changed (TRACKER_MINER (fs)); - - return TRUE; -} - -static const gchar * -get_file_urn (TrackerMinerFS *miner, - GFile *file, - gboolean *is_iri) -{ - const gchar *urn; - - urn = tracker_miner_fs_get_urn (miner, file); - *is_iri = TRUE; - - if (!urn) { - /* This is a new insertion, use anonymous URNs to store files */ - urn = "_:file"; - *is_iri = FALSE; - } - - return urn; -} - -static inline void -process_item (ProcessUserguideData *data, - GFileInfo *file_info, - gboolean is_dir, - GError **error) -{ - TrackerSparqlBuilder *sparql; - gchar *uri; - const gchar *mime_type; - const gchar *urn; - const gchar *parent_urn; - gboolean is_iri; - guint64 time_; - - sparql = data->sparql; - - uri = g_file_get_uri (data->file); - mime_type = g_file_info_get_content_type (file_info); - - urn = get_file_urn (data->miner, data->file, &is_iri); - - tracker_sparql_builder_insert_silent_open (sparql, NULL); - tracker_sparql_builder_graph_open (sparql, TRACKER_OWN_GRAPH_URN); - - if (is_iri) { - gchar *delete_properties_sparql; - - delete_properties_sparql = - g_strdup_printf ("DELETE {" - " GRAPH <%s> {" - " <%s> ?p ?o" - " } " - "} " - "WHERE {" - " GRAPH <%s> {" - " <%s> ?p ?o" - " FILTER (?p != rdf:type && ?p != nie:contentCreated)" - " } " - "} " - "DELETE {" - " <%s> nie:url ?o" - "} WHERE {" - " <%s> nie:url ?o" - "}", - TRACKER_OWN_GRAPH_URN, urn, - TRACKER_OWN_GRAPH_URN, urn, - urn, urn); - - tracker_sparql_builder_prepend (sparql, delete_properties_sparql); - tracker_sparql_builder_subject_iri (sparql, urn); - - g_free (delete_properties_sparql); - } else { - tracker_sparql_builder_subject (sparql, urn); - } - - tracker_sparql_builder_predicate (sparql, "a"); - tracker_sparql_builder_object (sparql, "nfo:FileDataObject"); - tracker_sparql_builder_object (sparql, "nie:InformationElement"); - - if (is_dir) { - tracker_sparql_builder_object (sparql, "nfo:Folder"); - } else { - tracker_sparql_builder_object (sparql, "nfo:HelpDocument"); - } - - parent_urn = tracker_miner_fs_get_parent_urn (TRACKER_MINER_FS (data->miner), data->file); - - if (parent_urn) { - tracker_sparql_builder_predicate (sparql, "nfo:belongsToContainer"); - tracker_sparql_builder_object_iri (sparql, parent_urn); - } - - tracker_sparql_builder_predicate (sparql, "nfo:fileName"); - tracker_sparql_builder_object_string (sparql, g_file_info_get_display_name (file_info)); - - tracker_sparql_builder_predicate (sparql, "nfo:fileSize"); - tracker_sparql_builder_object_int64 (sparql, g_file_info_get_size (file_info)); - - time_ = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_TIME_MODIFIED); - tracker_sparql_builder_predicate (sparql, "nfo:fileLastModified"); - tracker_sparql_builder_object_date (sparql, (time_t *) &time_); - - time_ = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_TIME_ACCESS); - tracker_sparql_builder_predicate (sparql, "nfo:fileLastAccessed"); - tracker_sparql_builder_object_date (sparql, (time_t *) &time_); - - /* Laying the link between the IE and the DO. We use IE = DO */ - tracker_sparql_builder_predicate (sparql, "nie:isStoredAs"); - if (is_iri) { - tracker_sparql_builder_object_iri (sparql, urn); - } else { - tracker_sparql_builder_object (sparql, urn); - } - - /* The URL of the DataObject (because IE = DO, this is correct) */ - tracker_sparql_builder_predicate (sparql, "nie:url"); - tracker_sparql_builder_object_string (sparql, uri); - - tracker_sparql_builder_predicate (sparql, "nie:mimeType"); - tracker_sparql_builder_object_string (sparql, mime_type); - - /* FIXME: Add nie:dataSource for switching different userguides? */ - tracker_sparql_builder_predicate (sparql, "tracker:available"); - tracker_sparql_builder_object_boolean (sparql, TRUE); - - if (!is_dir) { - gchar *content = NULL; - gchar *title = NULL; - - /* Get content */ - parser_get_file_content (uri, MAX_EXTRACT_SIZE, &content, &title); - - g_message ("Adding userguide:'%s', uri:'%s'", - title, - uri); - - if (title && title[0]) { - tracker_sparql_builder_predicate (sparql, "nie:title"); - tracker_sparql_builder_object_unvalidated (sparql, title); - } - - if (content && content[0]) { - tracker_sparql_builder_predicate (sparql, "nie:plainTextContent"); - tracker_sparql_builder_object_unvalidated (sparql, content); - } - - g_free (content); - g_free (title); - } else { - g_message ("Adding userguide directory:'%s'", uri); - } - - tracker_sparql_builder_graph_close (sparql); - tracker_sparql_builder_insert_close (sparql); - - g_free (uri); -} - -static void -process_userguide_data_free (ProcessUserguideData *data) -{ - g_object_unref (data->miner); - g_object_unref (data->file); - g_object_unref (data->sparql); - g_object_unref (data->cancellable); - - g_slice_free (ProcessUserguideData, data); -} - -static void -process_file_cb (GObject *object, - GAsyncResult *result, - gpointer user_data) -{ - ProcessUserguideData *data; - GFileInfo *file_info; - GError *error = NULL; - GFile *file; - gboolean is_dir; - - data = user_data; - file = G_FILE (object); - file_info = g_file_query_info_finish (file, result, &error); - - if (error) { - tracker_miner_fs_file_notify (TRACKER_MINER_FS (data->miner), file, error); - process_userguide_data_free (data); - g_error_free (error); - return; - } - - is_dir = g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY; - process_item (data, file_info, is_dir, &error); - - tracker_miner_fs_file_notify (TRACKER_MINER_FS (data->miner), data->file, error); - process_userguide_data_free (data); - - if (error) { - g_error_free (error); - } - - if (file_info) { - g_object_unref (file_info); - } -} - -static gboolean -miner_userguides_process_file (TrackerMinerFS *fs, - GFile *file, - TrackerSparqlBuilder *sparql, - GCancellable *cancellable) -{ - ProcessUserguideData *data; - const gchar *attrs; - - data = g_slice_new0 (ProcessUserguideData); - data->miner = g_object_ref (fs); - data->sparql = g_object_ref (sparql); - data->file = g_object_ref (file); - data->cancellable = g_object_ref (cancellable); - - attrs = G_FILE_ATTRIBUTE_STANDARD_TYPE "," - G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "," - G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," - G_FILE_ATTRIBUTE_STANDARD_SIZE "," - G_FILE_ATTRIBUTE_TIME_MODIFIED "," - G_FILE_ATTRIBUTE_TIME_ACCESS; - - g_file_query_info_async (file, - attrs, - G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, - G_PRIORITY_DEFAULT, - cancellable, - process_file_cb, - data); - - return TRUE; -} - -static gboolean -miner_userguides_process_file_attributes (TrackerMinerFS *fs, - GFile *file, - TrackerSparqlBuilder *sparql, - GCancellable *cancellable) -{ - gchar *uri; - - /* We don't care about file attribute changes here */ - uri = g_file_get_uri (file); - g_debug ("Ignoring file attribute changes in '%s'", uri); - g_free (uri); - - return FALSE; -} - -static void -parser_start_element (void *ctx, - const xmlChar *name, - const xmlChar **atts G_GNUC_UNUSED) -{ - const gchar *elem = (const gchar *) name; - ParserContext *pctx = ctx; - - if (g_strcmp0 (elem, "title") == 0) { - pctx->in_title = TRUE; - return; - } - - if (g_strcmp0 (elem, "body") == 0) { - pctx->in_text = TRUE; - return; - } -} - -static void -parser_end_element (void *ctx, - const xmlChar *name) -{ - const gchar *elem = (const gchar *) name; - ParserContext *pctx = ctx; - - if (g_strcmp0 (elem, "title") == 0) { - pctx->in_title = FALSE; - } -} - -static void -parser_characters (void *ctx, - const xmlChar *ch, - int len G_GNUC_UNUSED) -{ - ParserContext *pctx = ctx; - const gchar *str; - int len_to_append; - - if (pctx->in_title) { - const gchar *title = (const gchar *) ch; - - if (title[0]) { - g_string_append_len (pctx->title, - title, - MIN(strlen (title), MAX_TITLE_LENGTH)); - } - } - - if (!pctx->in_text) { - return; - } - - if ((gssize) pctx->plain_text->len >= pctx->max_length) { - return; - } - - str = (const gchar *) ch; - - if (!str || !str[0]) { - return; - } - - len_to_append = strlen (str); - - if ((gssize) pctx->plain_text->len + len_to_append > pctx->max_length) { - len_to_append = pctx->max_length - pctx->plain_text->len; - } - - g_string_append_len (pctx->plain_text, str, len_to_append); -} - -static void -parser_error (void *ctx, - const char *msg, - ...) -{ - ParserContext *pctx = ctx; - va_list args; - gchar *str; - - va_start (args, msg); - str = g_strdup_vprintf (msg, args); - va_end (args); - - g_critical ("Could not parse file '%s': %s", pctx->uri, str); - g_free (str); -} - -static void -parser_get_file_content (const gchar *uri, - gssize max_extract_size, - gchar **content, - gchar **title) -{ - GError *error = NULL; - gchar *filename; - ParserContext parser_ctx = { 0 }; - htmlSAXHandler sax_handler = { 0 }; - htmlDocPtr doc; - - /* TODO: utf8 sanitization */ - - filename = g_filename_from_uri (uri, NULL, &error); - - if (error) { - g_message ("Could not open '%s': %s", uri, error->message); - g_error_free (error); - g_free (filename); - return; - } - - parser_ctx.uri = g_strdup (uri); - parser_ctx.title = g_string_new (NULL); - parser_ctx.in_text = FALSE; - parser_ctx.in_title = FALSE; - parser_ctx.plain_text = g_string_new (NULL); - /* leave space for terminating 0 char */ - parser_ctx.max_length = max_extract_size - 1; - - sax_handler.startElement = parser_start_element; - sax_handler.endElement = parser_end_element; - sax_handler.characters = parser_characters; - sax_handler.error = parser_error; - - doc = NULL; - doc = htmlSAXParseFile (filename, "utf-8", &sax_handler, &parser_ctx); - g_free (filename); - - if (doc) { - xmlFreeDoc (doc); - } - - g_free (parser_ctx.uri); - - *title = g_string_free (parser_ctx.title, FALSE); - g_strstrip (*title); - - *content = g_string_free (parser_ctx.plain_text, FALSE); - g_strstrip (*content); -} - -TrackerMiner * -tracker_miner_userguides_new (GError **error) -{ - return g_initable_new (TRACKER_TYPE_MINER_USERGUIDES, - NULL, - error, - "name", "Userguides", - "processing-pool-wait-limit", 10, - "processing-pool-ready-limit", 100, - NULL); -} diff --git a/src/miners/user-guides/tracker-miner-user-guides.desktop.in.in b/src/miners/user-guides/tracker-miner-user-guides.desktop.in.in deleted file mode 100644 index 4274e1a41..000000000 --- a/src/miners/user-guides/tracker-miner-user-guides.desktop.in.in +++ /dev/null @@ -1,19 +0,0 @@ -[Desktop Entry] -_Name=Tracker User Guides Miner -_Comment=Crawls and processes user guides in shared areas -Icon= -Exec=@libexecdir@/tracker-miner-user-guides -Terminal=false -Type=Application -Categories=Utility; -X-Meego-Priority=Late -X-GNOME-Autostart-enabled=true -X-KDE-autostart-after=panel -X-KDE-StartupNotify=false -X-KDE-UniqueApplet=true -NoDisplay=true -OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; -X-GNOME-Bugzilla-Bugzilla=GNOME -X-GNOME-Bugzilla-Product=tracker -X-GNOME-Bugzilla-Component=Miners -X-GNOME-Bugzilla-Version=@VERSION@ diff --git a/src/miners/user-guides/tracker-miner-user-guides.h b/src/miners/user-guides/tracker-miner-user-guides.h deleted file mode 100644 index aeb5b7a84..000000000 --- a/src/miners/user-guides/tracker-miner-user-guides.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2008, Nokia <ivan.frade@nokia.com> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * Author: Martyn Russell <martyn@lanedo.com> - */ - -#ifndef __TRACKER_MINER_FS_USERGUIDES_H__ -#define __TRACKER_MINER_FS_USERGUIDES_H__ - -#include <libtracker-miner/tracker-miner.h> - -G_BEGIN_DECLS - -#define TRACKER_TYPE_MINER_USERGUIDES (tracker_miner_userguides_get_type()) -#define TRACKER_MINER_USERGUIDES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TRACKER_TYPE_MINER_USERGUIDES, TrackerMinerUserguides)) -#define TRACKER_MINER_USERGUIDES_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), TRACKER_TYPE_MINER_USERGUIDES, TrackerMinerUserguidesClass)) -#define TRACKER_IS_MINER_USERGUIDES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TRACKER_TYPE_MINER_USERGUIDES)) -#define TRACKER_IS_MINER_USERGUIDES_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), TRACKER_TYPE_MINER_USERGUIDES)) -#define TRACKER_MINER_USERGUIDES_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TRACKER_TYPE_MINER_USERGUIDES, TrackerMinerUserguidesClass)) - -typedef struct _TrackerMinerUserguides TrackerMinerUserguides; -typedef struct _TrackerMinerUserguidesClass TrackerMinerUserguidesClass; - -struct _TrackerMinerUserguides { - TrackerMinerFS parent_instance; - gpointer locale_notification_id; -}; - -struct _TrackerMinerUserguidesClass { - TrackerMinerFSClass parent_class; -}; - -GType tracker_miner_userguides_get_type (void) G_GNUC_CONST; -TrackerMiner *tracker_miner_userguides_new (GError **error); -gboolean tracker_miner_userguides_detect_locale_changed (TrackerMiner *miner); - -G_END_DECLS - -#endif /* __TRACKER_MINER_FS_USERGUIDES_H__ */ diff --git a/src/miners/user-guides/tracker-miner-user-guides.service.in b/src/miners/user-guides/tracker-miner-user-guides.service.in deleted file mode 100644 index 34f82dfab..000000000 --- a/src/miners/user-guides/tracker-miner-user-guides.service.in +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Tracker user guides data miner - -[Service] -Type=dbus -BusName=org.freedesktop.Tracker1.Miner.UserGuides -ExecStart=@libexecdir@/tracker-miner-user-guides -Restart=on-failure -# Don't restart after tracker daemon -k (aka tracker-control -k) -RestartPreventExitStatus=SIGKILL diff --git a/src/ontologies/Makefile.am b/src/ontologies/Makefile.am index 31ce129ff..4dce61e1a 100644 --- a/src/ontologies/Makefile.am +++ b/src/ontologies/Makefile.am @@ -1,6 +1,3 @@ -maemo_ontology = \ - 91-maemo.ontology 91-maemo.description - configdir = $(datadir)/tracker/ontologies config_DATA = \ @@ -23,12 +20,8 @@ config_DATA = \ 89-mtp.ontology 89-mtp.description \ 92-slo.ontology 92-slo.description \ 90-tracker.ontology 90-tracker.description \ + 91-maemo.ontology 91-maemo.description \ 93-libosinfo.ontology 93-libosinfo.description -if HAVE_MAEMO -config_DATA += $(maemo_ontology) -endif - EXTRA_DIST = \ - $(maemo_ontology) \ $(config_DATA) diff --git a/src/tracker-extract/tracker-extract.desktop.in.in b/src/tracker-extract/tracker-extract.desktop.in.in index f832b32a2..59fc0af2e 100644 --- a/src/tracker-extract/tracker-extract.desktop.in.in +++ b/src/tracker-extract/tracker-extract.desktop.in.in @@ -6,13 +6,12 @@ Exec=@libexecdir@/tracker-extract Terminal=false Type=Application Categories=Utility; -X-Meego-Priority=Late X-GNOME-Autostart-enabled=true X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true -OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Extractor diff --git a/src/tracker-store/tracker-store.desktop.in.in b/src/tracker-store/tracker-store.desktop.in.in index 78e855d0b..260b88018 100644 --- a/src/tracker-store/tracker-store.desktop.in.in +++ b/src/tracker-store/tracker-store.desktop.in.in @@ -11,7 +11,7 @@ X-KDE-autostart-after=panel X-KDE-StartupNotify=false X-KDE-UniqueApplet=true NoDisplay=true -OnlyShowIn=GNOME;KDE;XFCE;X-MEEGO-HS;X-MEEGO-NB;X-IVI;Unity; +OnlyShowIn=GNOME;KDE;XFCE;X-IVI;Unity; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=tracker X-GNOME-Bugzilla-Component=Store diff --git a/tests/functional-tests/400-extractor-metadata.py b/tests/functional-tests/400-extractor-metadata.py index 140b5d527..fc1604eb2 100755 --- a/tests/functional-tests/400-extractor-metadata.py +++ b/tests/functional-tests/400-extractor-metadata.py @@ -137,10 +137,6 @@ class ExtractionTestCase (ut.TestCase): def __assert_extraction_ok (self, result): self.__check_section ("Metadata", result) - if (cfg.haveMaemo and self.configParser.has_section ("Meego")): - self.__check_section ("Meego", result) - - def __check_section (self, section, result): error_missing_prop = "Property '%s' hasn't been extracted from file \n'%s'\n (requested on '%s' [%s])" error_wrong_value = "on property '%s' from file %s\n (requested on: '%s' [%s])" diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am index 8dd84552f..c3dd296c7 100644 --- a/tests/functional-tests/Makefile.am +++ b/tests/functional-tests/Makefile.am @@ -18,12 +18,6 @@ config_SCRIPTS = \ $(slow_tests) \ $(standard_tests) -if HAVE_MAEMO -config_SCRIPTS += \ - tests.xml \ - tracker-tests.aegis -endif - standard_tests = \ 01-insertion.py \ 02-sparql-bugs.py @@ -61,18 +55,6 @@ slow_tests = \ 12-transactions.py \ 13-threaded-store.py -tests.xml: - @if test -h /targets/links/scratchbox.config ; then \ - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \ - fi; - $(top_srcdir)/tests/functional-tests/create-tests-xml.py $(standard_tests) > tests.xml - -tracker-tests.aegis: - @if test -h /targets/links/scratchbox.config ; then \ - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; \ - fi; - $(top_srcdir)/tests/functional-tests/create-tests-aegis.py $(standard_tests) > tracker-tests.aegis - 10-sqlite-misused.py: ttl/gen-test-data.stamp 11-sqlite-misused-batch.py: ttl/gen-test-data.stamp 13-busy-store.py: ttl/gen-test-data.stamp @@ -95,12 +77,5 @@ functional-test-slow: ${slow_tests} EXTRA_DIST = \ $(config_SCRIPTS) \ $(config_DATA) \ - create-tests-xml.py \ test-runner.sh \ meson.build - -if HAVE_MAEMO -CLEANFILES = \ - tests.xml \ - tracker-tests.aegis -endif diff --git a/tests/functional-tests/common/utils/configuration.py.in b/tests/functional-tests/common/utils/configuration.py.in index af7bf8cd9..2ccaecebf 100644 --- a/tests/functional-tests/common/utils/configuration.py.in +++ b/tests/functional-tests/common/utils/configuration.py.in @@ -78,8 +78,7 @@ RAW_BINDIR = "@bindir@" EXEC_PREFIX = os.path.normpath (expandvars (RAW_EXEC_DIR)) DATADIR = os.path.normpath (expandvars (RAW_DATA_DIR)) BINDIR = os.path.normpath (expandvars (RAW_BINDIR)) - -haveMaemo = ("@HAVE_MAEMO_TRUE@" == "") + haveUpstart = ("@HAVE_UPSTART_TRUE@" == "") disableJournal = ("@DISABLE_JOURNAL_TRUE@" == "") diff --git a/tests/functional-tests/common/utils/system.py b/tests/functional-tests/common/utils/system.py index 093b468ec..177f551e9 100644 --- a/tests/functional-tests/common/utils/system.py +++ b/tests/functional-tests/common/utils/system.py @@ -19,8 +19,7 @@ import helpers TEST_ENV_DIRS = { "XDG_DATA_HOME" : os.path.join (cfg.TEST_TMP_DIR, "data"), "XDG_CACHE_HOME": os.path.join (cfg.TEST_TMP_DIR, "cache")} -TEST_ENV_VARS = { "TRACKER_DISABLE_MEEGOTOUCH_LOCALE": "", - "LC_COLLATE": "en_GB.utf8", +TEST_ENV_VARS = { "LC_COLLATE": "en_GB.utf8", "DCONF_PROFILE": os.path.join (cfg.DATADIR, "tracker-tests", "trackertest") } diff --git a/tests/functional-tests/create-tests-aegis.py b/tests/functional-tests/create-tests-aegis.py deleted file mode 100755 index 57a5e5e58..000000000 --- a/tests/functional-tests/create-tests-aegis.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python -import os -import sys -import inspect -import imp - -from common.utils import configuration as cfg - -### This function comes from pydoc. Cool! -def importfile(path): - """Import a Python source file or compiled file given its path.""" - magic = imp.get_magic() - file = open(path, 'r') - if file.read(len(magic)) == magic: - kind = imp.PY_COMPILED - else: - kind = imp.PY_SOURCE - file.close() - filename = os.path.basename(path) - name, ext = os.path.splitext(filename) - file = open(path, 'r') - module = None - try: - module = imp.load_module(name, file, path, (ext, 'r', kind)) - except Exception, e: - print >> sys.stderr, "Ignoring %s (%s)" % (path, e) - #raise Exception () - file.close() - return module - - -HEADER = """ -<aegis>""" - -FOOTER = """ -</aegis>""" - -def print_aegis_perm_request (filename): - module = importfile (filename) - if not module: - return - - install_path = os.path.join (cfg.DATADIR, "tracker-tests", filename) - - print "\n <request>" - print ' <credential name="TrackerReadAccess" />' - print ' <credential name="TrackerWriteAccess" />' - print ' <credential name="tracker::tracker-extract-access" />' - print ' <credential name="tracker::tracker-miner-fs-access" />' - print ' <credential name="GRP::metadata-users" />' - print ' <credential name="UID::user" />' - print ' <credential name="GID::users" />' - print ' <for path="%s" />' % (install_path) - print " </request>" - -if __name__ == "__main__": - - if (len (sys.argv) < 2): - print >> sys.stderr, "pass .py tests as parameter" - sys.exit (-1) - print HEADER - map (print_aegis_perm_request, sys.argv[1:]) - print FOOTER diff --git a/tests/functional-tests/create-tests-xml.py b/tests/functional-tests/create-tests-xml.py deleted file mode 100755 index 5bbca2a53..000000000 --- a/tests/functional-tests/create-tests-xml.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/python -import os -import sys -import inspect -import imp - -from common.utils import configuration as cfg - -### This function comes from pydoc. Cool! -def importfile(path): - """Import a Python source file or compiled file given its path.""" - magic = imp.get_magic() - file = open(path, 'r') - if file.read(len(magic)) == magic: - kind = imp.PY_COMPILED - else: - kind = imp.PY_SOURCE - file.close() - filename = os.path.basename(path) - name, ext = os.path.splitext(filename) - file = open(path, 'r') - module = None - try: - module = imp.load_module(name, file, path, (ext, 'r', kind)) - except Exception, e: - print >> sys.stderr, "Ignoring %s (%s)" % (path, e) - #raise Exception () - file.close() - return module - - -HEADER = """ -<testdefinition version="0.1"> - <suite name="tracker"> - <description>Functional tests for the brilliant tracker</description> """ - -TEST_CASE_TMPL = """ <case name="%s" timeout="180"> - <description>%s</description> - <step>%s</step> - </case>""" - -FOOTER = """ - </suite> -</testdefinition>""" - -if (cfg.haveUpstart): - PRE_STEPS = """ <pre_steps> - <step>initctl stop xsession/tracker-writeback</step> - <step>initctl stop xsession/tracker-miner</step> - <step>initctl start xsession/tracker-stop</step> - </pre_steps> - """ -else: - PRE_STEPS = """ <pre_steps> - <step>while tracker daemon -p |grep -q '^Found process ID '; do tracker daemon -t; sleep 1; done</step> - </pre_steps> - """ - -def __get_doc (obj): - if obj.__doc__: - return obj.__doc__.strip () - else: - return "FIXME description here" - -def print_as_xml (filename): - - module = importfile (filename) - if not module: - return - - print "\n <set name=\"%s\">" % (module.__name__) - print " <description>%s</description>" % (__get_doc (module)) - print PRE_STEPS - for name, obj in inspect.getmembers (module): - if name.startswith ("Common") or name.endswith ("Template"): - continue - - if (inspect.isclass (obj) - and obj.__module__ == filename[:-3]): - script = os.path.join (cfg.DATADIR, "tracker-tests", filename) - print TEST_CASE_TMPL % (name, - __get_doc (obj), - script + " " + name) - - print """ <environments> - <scratchbox>true</scratchbox> - <hardware>true</hardware> - </environments> - </set> - """ - # Remove the compiled .pyc from the disk (because it looks ugly) - # - # First time a module is loaded, __file__ is the .py - # once the file is compiled, __file__ is .pyc - if module.__file__.endswith (".py"): - unlink = module.__file__ + "c" - else: - unlink = module.__file__ - os.unlink (unlink) - - -if __name__ == "__main__": - - if (len (sys.argv) < 2): - print >> sys.stderr, "pass .py tests as parameter" - sys.exit (-1) - print HEADER - map (print_as_xml, sys.argv[1:]) - print FOOTER diff --git a/tests/functional-tests/test-extraction-data/README b/tests/functional-tests/test-extraction-data/README index 1a3e21596..cfbc0e175 100644 --- a/tests/functional-tests/test-extraction-data/README +++ b/tests/functional-tests/test-extraction-data/README @@ -7,8 +7,6 @@ The python test will traverse recursively this directory, loading the .expected ===================== It is a .ini (.desktop) formatted file with two mandatory sections: TestFile and Metadata. -Optionally there can be a "Meego" section, for metadata that should be checked only on that platform. -Adding more platforms is fairly trivial but requires to modify the python code. The TestFile section contains the * Filename (mandatory): relative path from the .expected of the file under test. diff --git a/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected b/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected index 4336b0eaa..22a53eb53 100644 --- a/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected +++ b/tests/functional-tests/test-extraction-data/audio/Jazz_Audio_OPLs0.expected @@ -9,5 +9,3 @@ a=nmm:MusicPiece !a=nmm:Video !a=nfo:Image !a=nmm:Photo - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected b/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected index 87599620f..fda57c557 100644 --- a/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected +++ b/tests/functional-tests/test-extraction-data/audio/audio-test-1.expected @@ -15,5 +15,3 @@ nfo_channels=1 nfo_duration=15 nfo_sampleRate=22050 nfo_averageBitrate=32000 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected b/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected index 0ab85f9c4..4edc82465 100644 --- a/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected +++ b/tests/functional-tests/test-extraction-data/audio/audio-test-2.expected @@ -14,6 +14,3 @@ nfo_codec=MPEG nfo_channels=2 nfo_sampleRate=44100 nfo_averageBitrate=256000 - -[Meego] -nfo_encodedBy=Nokia Music diff --git a/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected b/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected index 906022c9e..7251f7021 100644 --- a/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected +++ b/tests/functional-tests/test-extraction-data/images/comment-extension-block.expected @@ -9,5 +9,3 @@ a=nmm:Photo nfo_width=600 nfo_height=450 nie_comment=GIF image format only supports comments in 7-bit ASCII encoding! - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-1.expected b/tests/functional-tests/test-extraction-data/images/test-image-1.expected index 64a11a7a1..e4a08849c 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-1.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-1.expected @@ -16,5 +16,3 @@ nie_comment=This is a for tracker test slo_location_postalAddress=@URNUUID@ nfo_horizontalResolution=20 nfo_verticalResolution=20 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-2.expected b/tests/functional-tests/test-extraction-data/images/test-image-2.expected index 5264068b3..f4ab5b6f7 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-2.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-2.expected @@ -7,5 +7,3 @@ Comment=Basic png example a=nmm:Photo nfo_width=211 nfo_height=217 - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/images/test-image-3.expected b/tests/functional-tests/test-extraction-data/images/test-image-3.expected index 7aab615a1..7121a4ccc 100644 --- a/tests/functional-tests/test-extraction-data/images/test-image-3.expected +++ b/tests/functional-tests/test-extraction-data/images/test-image-3.expected @@ -9,5 +9,3 @@ nfo_width=37 nfo_height=39 nie_title=/home/amit/Desktop/test-image-3.tif nfo_orientation=nfo:orientation-top-mirror - -[Meego] diff --git a/tests/functional-tests/test-extraction-data/office/pdf-doc.expected b/tests/functional-tests/test-extraction-data/office/pdf-doc.expected index 93de5b724..3580ec32f 100644 --- a/tests/functional-tests/test-extraction-data/office/pdf-doc.expected +++ b/tests/functional-tests/test-extraction-data/office/pdf-doc.expected @@ -3,7 +3,5 @@ Filename=pdf-doc.pdf Comment=PDF document from the office tools [Metadata] - -[Meego] a=nfo:PaginatedTextDocument nfo_pageCount=22 diff --git a/tests/functional-tests/test-extraction-data/video/184505.expected b/tests/functional-tests/test-extraction-data/video/184505.expected index c2a9839ed..d62395df5 100644 --- a/tests/functional-tests/test-extraction-data/video/184505.expected +++ b/tests/functional-tests/test-extraction-data/video/184505.expected @@ -6,7 +6,5 @@ Comment=Video without audio stream. Seems to be clasified as Audio. [Metadata] a=nmm:Video !a=nmm:Audio - -[Meego] nfo_height=480 nfo_width=864 diff --git a/tests/functional-tests/test-extraction-data/video/video-1.expected b/tests/functional-tests/test-extraction-data/video/video-1.expected index aaa28be77..59237d118 100644 --- a/tests/functional-tests/test-extraction-data/video/video-1.expected +++ b/tests/functional-tests/test-extraction-data/video/video-1.expected @@ -5,7 +5,5 @@ Comment=Just one standard mp4 a=nmm:Video nie_title=MPEG-4-x264.mp4 nfo_codec=MPEG-4 AAC audio - -[Meego] nfo_height=240 nfo_width=320 diff --git a/tests/functional-tests/test-extraction-data/video/video-2.expected b/tests/functional-tests/test-extraction-data/video/video-2.expected index a738c8571..ce8633514 100644 --- a/tests/functional-tests/test-extraction-data/video/video-2.expected +++ b/tests/functional-tests/test-extraction-data/video/video-2.expected @@ -5,7 +5,5 @@ Comment=Produces a Critical in Gstreamer freeing a component. [Metadata] a=nmm:Video - -[Meego] nfo_height=144 nfo_width=192 diff --git a/tests/functional-tests/test-runner.sh b/tests/functional-tests/test-runner.sh index b34aaae49..857b26c94 100755 --- a/tests/functional-tests/test-runner.sh +++ b/tests/functional-tests/test-runner.sh @@ -18,19 +18,13 @@ export REAL_HOME=`echo ~` # in the filesystem HOME=$TEMP_DIR -if test -h /targets/links/scratchbox.config ; then - export SBOX_REDIRECT_IGNORE=/usr/bin/python ; +eval `dbus-launch --sh-syntax` - meego-run $@ -else - eval `dbus-launch --sh-syntax` +trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT - trap "/bin/kill $DBUS_SESSION_BUS_PID; exit" INT +echo "Running $@" +$@ - echo "Running $@" - $@ - - kill $DBUS_SESSION_BUS_PID -fi ; +kill $DBUS_SESSION_BUS_PID rm -R $TEMP_DIR diff --git a/tests/libtracker-extract/Makefile.am b/tests/libtracker-extract/Makefile.am index 3199a4148..932531f26 100644 --- a/tests/libtracker-extract/Makefile.am +++ b/tests/libtracker-extract/Makefile.am @@ -20,10 +20,6 @@ endif if HAVE_ENCA test_programs += tracker-encoding -else -if HAVE_MEEGOTOUCH -test_programs += tracker-encoding -endif endif AM_CPPFLAGS = \ diff --git a/tests/libtracker-extract/tracker-encoding-test.c b/tests/libtracker-extract/tracker-encoding-test.c index f6089bac1..ede671461 100644 --- a/tests/libtracker-extract/tracker-encoding-test.c +++ b/tests/libtracker-extract/tracker-encoding-test.c @@ -53,7 +53,7 @@ static void test_encoding_can_guess (void) { /* This just duplicates the function code... */ -#if defined (HAVE_ENCA) || defined (HAVE_MEEGOTOUCH) || defined (HAVE_LIBICU_CHARSET_DETECTION) +#if defined (HAVE_ENCA) || defined (HAVE_LIBICU_CHARSET_DETECTION) g_assert (tracker_encoding_can_guess ()); #else g_assert (!tracker_encoding_can_guess ()); diff --git a/tests/tracker-writeback/tests.xml b/tests/tracker-writeback/tests.xml deleted file mode 100644 index 37b3a8b92..000000000 --- a/tests/tracker-writeback/tests.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<testdefinition version="0.1"> - <suite name="tracker-tests" domain="tracker-store"> - <!-- At least one set per suite, name and description mandatory --> - <set name="testset1" description="Basic sparql tests" feature="sparql-insert"> - <pre_steps> - <!-- This doesn't seem to work --> - <step>. /tmp/session_bus_address.user</step> - <step>tracker-writeback &</step> - </pre_steps> - - <!-- At least one case per set, name mandatory, description mandatory, other optional --> - <case name="test_simple_insertion" type="Functional" level="Feature" - description="Insert and check results" requirement="01" subfeature=""> - <!-- dbus env variables defined here. This works. --> - <step expected_result="0">. /tmp/session_bus_address.user; python2.5 /usr/share/tracker-tests/01-writeback.py</step> - </case> - - - <!-- Environments optional - tells where the tests are run --> - <environments> - <scratchbox>true</scratchbox> - <hardware>true</hardware> - </environments> - - </set> - </suite> -</testdefinition> |