Version: 0.9.2-final (using KDE 3.5.8) Installed from: Ubuntu Packages OS: Linux Let's take a file an tag it with the word "Senegal", then synchronize the images from the database. 21:12 jim@senecio ~/digikam_albums/Senegal2008% exiv2 -p iptc img_1640.jpg Iptc.Application2.Program String 7 digiKam Iptc.Application2.ProgramVersion String 11 0.9.2-final Iptc.Application2.Keywords String 8 Senegal Wait - surely I'm going to visit other countries, so let's make a "Place" category and put "Senegal" in it by drag and dropping it there in the "Tag Filters" tree display on the right of the main window. 21:13 jim@senecio ~/digikam_albums/Senegal2008% exiv2 -p iptc img_1640.jpg Iptc.Application2.Program String 7 digiKam Iptc.Application2.ProgramVersion String 11 0.9.2-final Iptc.Application2.Keywords String 8 Senegal Iptc.Application2.Keywords String 14 Place/Senegal Ooops. "Place/Senegal" is correct, but "Senegal" has not been deleted. Maybe this is consistent with Digikam's policy of not harming existing data inside the picture file. But from my point of view this is not what I expected.
May be somehow related with bug 15873 (http://bugs.kde.org/show_bug.cgi?id=158713) and bug 136254 (http://bugs.kde.org/show_bug.cgi?id=136254).
By the way, if you are hit by this bug, here is the workaround : - 'exiv2 rm -d i yourfile.jpg' or 'exiv2 rm -d i *.jpg' will erase IPTC metadata. - then hit "Synchronize images with the database" and your files shall soon be populated by the right tags fresh from the the database and with no trace of the moved or erased tags.
I can confirm this bug. I have to remove the IPTC metadata first and synchronize the images with the database, otherwise old tags are still in the metadata or moved tags are duplicated.
Confirmed in SVN (revisions: exiv2 1463, graphics 813168, libs 813167)
Marcel, I suspect a bug in MetadataHub. Same in http://bugs.kde.org/show_bug.cgi?id=152199 Gilles Caulier
This is due to digikam's behavior: Existing tags from Metadata are kept. There are two possible solutions to this problem: 1) When the tag is changed, the metadata of all images with this tag would need to be resynchronized automatically, actually only those files where the tag has been written to the metadata. 2) Digikam would need to know that Places/Senegal was formerly Senegal. This boils down to keep a map of tag movement history. You see that both solution have significant side effects.
Hi Marcel, I think that (2) is unnecessarily complicated. But the approach in (1) seems to be what a user would anticipate and expect: moving a tag around inside the tag tree should update images which include that tag. Is there a case where this behaviour would be incorrect? PS. Could a general function to update relevant images after changes to the tag tree also help solve bugs like #152199?
To Marcel #6, I vote for 1). It's more simple. To x3ri7yz02 #7, Try Tools/Update Metadata Database menu entry Gilles Caulier
Considering #2 - What about iptc fields that Digikam doesn't use? They could become unnecessarily deleted if you remove all iptc. In my case last year I had some old tags in "supplemental categories" and some other iptc fields that would not have been repopulated using this method. This might be useful: exiv2 -v -M"del Iptc.Application2.Keywords" [filename] Also for anyone interested Arnd and I both wrote scripts to scan directories and remove tags using this method last December. They should be available on the mailing list. One example: http://mail.kde.org/pipermail/digikam-users/2007-December/004507.html
Don't forget the action of renaming a tag. Should behave the same way than moving a tag in the tree.
SVN commit 982571 by cgilles: This is a long standing bug about Tag synchronization to XMP and IPTC keywords. To wrap around this problem, we remove all previous keywords before to apply new sets. Marcel, i think MetadataHub is right : new and old tags lists are fine. Problem must be in libkexiv2. Anyway this patch fix the problem for the moment. BUGS: 175321 BUGS: 159158 BUGS: 141912 BUGS: 186308 CCMAIL: marcel.wiesweg@gmx.de M +7 -4 metadatahub.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=982571