After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526296 - services cannot be used if common.db was created with an old version of tracker which didn't support the specific services
services cannot be used if common.db was created with an old version of track...
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other All
: Normal blocker
: ---
Assigned To: Jamie McCracken
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2008-04-05 09:54 UTC by Albert Zeyer
Modified: 2010-05-17 13:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Albert Zeyer 2008-04-05 09:54:44 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:
Comment 1 Ivan Frade 2008-04-08 12:26:58 UTC
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)

Comment 2 Albert Zeyer 2008-04-08 12:48:02 UTC
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

Comment 3 Albert Zeyer 2008-04-08 12:53:43 UTC
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...
Comment 4 Ivan Frade 2008-04-08 13:00:06 UTC
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.
Comment 5 Albert Zeyer 2008-04-08 13:00:50 UTC
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"?
Comment 6 Ivan Frade 2008-04-08 13:12:55 UTC
"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]
Comment 7 Ivan Frade 2008-05-05 13:26:28 UTC
Closing bug as fixed: Removing ~/.local/share/tracker/data/common.db and restarting tracker fixes the problem.
Comment 8 Albert Zeyer 2008-05-05 14:43:57 UTC
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.
Comment 9 Mikael Ottela 2010-01-09 04:09:04 UTC
There is versioning for the database with old version leading to reindex already.

Resolving the bug as fixed
Comment 10 Martyn Russell 2010-05-17 13:33:04 UTC
Moving "Indexer" component bugs to "General" since "Indexer" refers to the old 0.6 architecture