Bug 282918 - digiKam tags list is swarmed with Nepomuk resource tags if Nepomuk is not running
Summary: digiKam tags list is swarmed with Nepomuk resource tags if Nepomuk is not run...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Database-Baloo (show other bugs)
Version: 2.1.1
Platform: openSUSE RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-27 16:14 UTC by Falk Krönert
Modified: 2012-10-17 18:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Falk Krönert 2011-09-27 16:14:57 UTC
Version:           2.1.1 (using KDE 4.7.1) 
OS:                Linux

If Nepomuk is running and Nepomuk usage is active in digiKam, the virtuoso-t and digikamnepomukservice processes use up a lot of cpu, but since they're nice'd it's not so bad and I usually leave them running.
At one point however, they almost blocked the system so I had to stop them (via KDE systemsettings, even though it took several minutes and I was about to -9 them).
Starting digiKam with Nepomuk deactivated led to a mess. The tags list is literally swarmed with hundreds of nepomuk:/res/…, additionally, all tags sub-categorized below others appear in the top tag list as well. This makes tags in digiKam basically useless.
The correct tags still exist and the images are tagged correctly, but tagging new images or even just filtering for existing tags becomes very tedious.
Restarting Nepomuk or switching Nepomuk usage in digiKam on or off has no effect.

Reproducible: Always

Steps to Reproduce:
1. Setup a new user account.
2. Copy or symlink a bunch of images (preferably original, unchanged raw images with no tags already written to them) to a place the user has access to. Make sure to not copy or link .xmp files if there are some.
3. Make sure Nepomuk is activated and running
4. Start digiKam, point it to the images and let it scan them
5. Activate Nepomuk usage in the digiKam settings
6. Tag the images, including nested tags
7. Exit digiKam and stop Nepomuk
8. Restart digiKam and look at the tag list

Actual Results:  
The tag list is filled with internal Nepomuk resource tags and duplicates of existing tags without their sub-category. It also makes the tag widget very sluggish.

Expected Results:  
No changes to the tag list should occur.

Question: Is there a way to repair or fix this without re-tagging all images? Or simply not show these additional tags?
Comment 1 Falk Krönert 2011-10-11 02:01:21 UTC
I found an easy way of getting rid most of these additional tags:

1. in digiKam, disable nepomuk integration (both read and write)
2. quit digiKam
3. run sqlite3 ~/Pictures/digikam4.db (or wherever it is)
4. in sqlite run "DELETE FROM Tags WHERE name LIKE 'nepomuk%';"
5. quite sqlite
6. start digiKam to confirm the tag list is ok again

This will remove all synthetic nepomuk tags, the other ones ripped out of their categories still have to be deleted manually, unfortunately.
Comment 2 Marcel Wiesweg 2012-10-17 18:44:54 UTC
Git commit b882df3641e6a3b6b0ff35552d1c9cda434e868e by Marcel Wiesweg.
Committed on 17/10/2012 at 18:36.
Pushed by mwiesweg into branch 'master'.

Disable the current implementation of a digikam-nepomuk integration.

By information from the Nepomuk maintainer, the relevant API have been replaced.
Essentially, the current code is at best not functional, at worst polluting your Nepomuk db.
A new implementation needs to be written based on current APIs.
Related: bug 258837, bug 264124, bug 276457, bug 283168, bug 304052, bug 279404, bug 305079

M  +35   -35   CMakeLists.txt
M  +12   -0    utilities/nepomuk/digikamnepomukservice.cpp
M  +13   -0    utilities/nepomuk/digikamnepomukservice.h

http://commits.kde.org/digikam/b882df3641e6a3b6b0ff35552d1c9cda434e868e