GNOME Bugzilla – Bug 526296
services cannot be used if common.db was created with an old version of tracker which didn't support the specific services
Last modified: 2010-05-17 13:33:04 UTC
Please describe the problem: see http://bugs.gentoo.org/show_bug.cgi?id=216295 for further details Steps to reproduce: run trackerd Actual results: you only see the given output Expected results: Does this happen every time? yes Other information:
Could you please try this?: 1) Check your file /usr/local/share/tracker/services/default.service It must contain something: [Applications] DisplayName=Applications Description=Application files UIVisible=true Icon=stock_active ShowServiceFiles=true KeyMetadata1=App:DisplayName KeyMetadata2=App:Exec KeyMetadata3=App:Icon TileMetadata=App:GenericName;AppComment;App:Categories 2) Delete the file ~/.local/share/tracker/data/common.db and restart tracker (even better with --reindex option)
I have the file /usr/share/tracker/services/default.service. It contains: [Applications] DisplayName=Applications Description=Application files UIVisible=true Icon=stock_active ShowServiceFiles=true KeyMetadata1=App:DisplayName KeyMetadata2=App:Exec KeyMetadata3=App:Icon TileMetadata=App:GenericName;AppComment;App:Categories
Deleting the file ~/.local/share/tracker/data/common.db and running 'trackerd --reindex' after helped. Perhaps it had problems because I had an earlier version of tracker installed before. For now it seems to work and indexing right now...
Yes, probably you were using an old version of the database. Tracker only create the common.db database from configuration files if it doesnt exist.
In the bug here: http://bugs.gentoo.org/show_bug.cgi?id=216295 I have posted some code snippets. I still wonder about this: I searched in the whole code for "service_table" and I get: sanity_check_option_values(): tracker->service_table = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL); And some g_hash_table_lookup() to this service_table. But there is no single line of code which adds any entries to this table! Have I missed any reference to "service_table"?
"Common.db" contains the service type descriptions. When tracker starts: <pseudocode> if common.db doesnt exist: create common.db loading data from default.services load service descriptions from common.db in some hash tables. </pseudocode> Probably the [Applications] service was added after 0.6.3 and your common.db was not regenerated. About the code questions, today i committed a patch refactoring the service-type code. Take a look into tracker_service_manager.[ch]
Closing bug as fixed: Removing ~/.local/share/tracker/data/common.db and restarting tracker fixes the problem.
Is it really fixed? You suggested a possible workaround as a solution. IMO, a fix to this problem would be that tracker checks if the common.db was created with an old version and/or that there are services in default.services which are not in common.db (and in this case, tracker should add these to common.db). I think this is important. Perhaps you are adding more services later to tracker and then all users of old versions cannot use these new services without this workaround.
There is versioning for the database with old version leading to reindex already. Resolving the bug as fixed
Moving "Indexer" component bugs to "General" since "Indexer" refers to the old 0.6 architecture