Re: [Tracker] usb detection alternatives
- From: Martyn Russell <martyn lanedo com>
- To: John stacy <tracker indexer gmail com>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] usb detection alternatives
- Date: Tue, 28 Feb 2012 15:16:01 +0000
On 28/02/12 14:08, John stacy wrote:
Hello Team,
Hello,
I have a basic questions on the USB Volume identification of tracker.
My basic understanding about the detection is as follows.
1. It depends on the gvfs -> udisks package for the Volume identification.
2. If gvfs is not present in the system then it simply monitors the
/etc/mtab file.
Please correct me if I am wrong in the above points.
Yes, I believe so. This is all done via the glib APIs of course.
Now, In my system I have my own notification mechanism ( No UDEV,UDISKS
and GVFS) and I dont want to depend on the /etc/mtab as it is linked to
the /proc/mounts.
Is there any other way that I can notify the tracker for media
insertions and removals? My end goal is that tracker should consider the
USB as removable media.
You could patch our code to statically know about devices/locations if
you wanted a quick fix there. The code is here:
For master:
http://git.gnome.org/browse/tracker/tree/src/libtracker-miner/tracker-storage.c
Not sure what version you're using but that file hasn't changed much
recently anyway.
I was modifying the miner configuration file (IndexRecursiveDirectories
field) for every insertion and removals. In this case, it is not
considering the USB as a removable media.
There have been a few fixes in these areas recently (0.12.x and master),
for 0.10.x it might be that we need to cherry-pick those fixes onto the
tracker-0.10 branch too. I noticed an issue on initial indexing when the
DBs are created and added a fix recently. See:
http://git.gnome.org/browse/tracker/commit/src?id=ec03ea6fad5bfde565425135b8d5b80800e98f1e
Please throw some light on the same. Are there any API's available to
just stich the underlying notification mechanism to the existing
tracker. BTW I am using tracker 0.10.37 version.
Yea, I think the best thing to do here would be to patch the storage
file to your liking. The API we provide is quite limited and should be
easy enough to support for your local system:
http://git.gnome.org/browse/tracker/tree/src/libtracker-miner/tracker-storage.h
It would need some testing of course, I have no idea how well it would
work, but that's where I would start if you prefer none of the glib
variants and want something quick to play with.
--
Regards,
Martyn
Founder and CEO of Lanedo GmbH.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]