Re: [Tracker] Enhancement proposal: Automatic reindexing when adding new extractors
- From: Adrien Bustany <madcat mymadcat com>
- To: Martyn Russell <martyn lanedo com>
- Cc: Tracker list <tracker-list gnome org>
- Subject: Re: [Tracker] Enhancement proposal: Automatic reindexing when adding new extractors
- Date: Wed, 17 Feb 2010 17:31:04 +0100
On Wed, 17 Feb 2010 14:59:17 +0000, Martyn Russell <martyn lanedo com>
wrote:
On 17/02/10 14:43, Adrien Bustany wrote:
we don't have to change two files, but simply implement a method of
storing the md5s.
But do we have one desktop file per extractor here, or one for Tracker
?
OK, let me try to be a bit clearer :)
--
Most applications install a .desktop file already. In this .desktop
file, the mime type(s) are often included. For example:
Eye of GNOME's desktop file: /usr/share/applications/eog.desktop
MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-xbitmap;image/x-xpixmap;image/x-pcx;image/svg+xml;image/svg+xml-compressed;image/vnd.wap.wbmp;
So, having our own .desktop file in /usr/share/tracker/extractors just
to duplicate the same information (which may become out of sync too)
seems wrong to me. Instead, I would rather have a file which has
something like:
[eog.desktop]
DesktopFile=/usr/share/applications/eog.desktop
ShouldReindex=
and when we install an up to date extractor which has fixes for specific
mime types, we can then just set the ShouldReindex value to something
like:
ShouldReindex=image/gif;
and when we are done with the reindex, we can set it to nothing again.
Oooh OK I get it. But how do we are sure an application is installed ?
Should
the pdf extractor, which uses poppler, link to evince's .desktop file ?
--
Hmm, just considering this a bit more, storing a "state" in a $prefix
directory is not really a good idea. This means that once we have (let's
say) reindexed the data, we would then need root permissions to change
the file we keep in $datadir/tracker/extractors.
This also causes problems when trying to think of a cross-user solution.
The state file would be per user, since the database is per user. Stored
in
XDG_CACHE_DIR or something similar.
The idea was to be able to update extractors independantly from Tracker
itself...
By "update" you mean, change this .ini type file which we keep around
with mime types right?
I mean shipping a new version of an extractor, which is independant from
Tracker
(3rd party extractors for example).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]