Re: [Tracker] Enhancement proposal: Automatic reindexing when adding new extractors



On 17/02/10 16:31, Adrien Bustany wrote:
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 ?

Well, I think this approach assumes the extractor is written by the application that supports these new mime types. When they update their extractor, they would have to let tracker know by updating that ini file with the mime types that the updated extractor affects.

The link to the .desktop file was just a way of not reproducing the list of mime types that the extract supports. Of course, if a 3rd party extractor is written without an application, then it would be needed if you wanted to push the mime-type list to a single location (i.e. not just in the extractor's source file as it is now).

--
Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]