Bug 387165 - XMP files generated for Batchtool temporary files and not removed
Summary: XMP files generated for Batchtool temporary files and not removed
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (show other bugs)
Version: 5.6.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-20 19:20 UTC by jon33040
Modified: 2017-11-22 17:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jon33040 2017-11-20 19:20:55 UTC
.xmp sidecar files are being generated for the files created while the batchtool is running and not removed/renamed when the batch process finishes. This leaves debris in the directories where the results of the batch process are put. e.g.

$ ls
BatchTool-C15091-BatchTool-d15091-DSC07026_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC06997_v1_w.jpg
BatchTool-J15091-BatchTool-f15091-DSC07021_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC06997_v1_w.jpg.xmp
BatchTool-J15091-DSC07003_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07003_v1_w.jpg
BatchTool-M15091-BatchTool-J15091-DSC07003_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07003_v1_w.jpg.xmp
BatchTool-S15091-BatchTool-h15091-DSC07014_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07014_v1_w.jpg
BatchTool-T15091-BatchTool-Z15091-DSC07024_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07014_v1_w.jpg.xmp
BatchTool-Z15091-DSC07024_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07021_v1_w.jpg
BatchTool-d15091-DSC07026_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07021_v1_w.jpg.xmp
BatchTool-f15091-DSC07021_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07024_v1_w.jpg
BatchTool-h15091-DSC07014_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07024_v1_w.jpg.xmp
BatchTool-i15091-BatchTool-n15091-DSC06997_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07026_v1_w.jpg
BatchTool-n15091-DSC06997_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07026_v1_w.jpg.xmp
Comment 1 Maik Qualmann 2017-11-20 19:48:15 UTC
I can not reproduce the problem. Can you please test it with a more recent version (AppImage) from here?

https://files.kde.org/digikam/

Maik
Comment 2 caulier.gilles 2017-11-20 20:07:39 UTC
I cannot reproduce here too with current 5.8.0.

Did you use a specific metadata settings in digiKam or an older Exiv2 library version ?

Gilles Caulier
Comment 3 jon33040 2017-11-20 20:21:02 UTC
(In reply to caulier.gilles from comment #2)
> I cannot reproduce here too with current 5.8.0.
> 
> Did you use a specific metadata settings in digiKam or an older Exiv2
> library version ?
> 
> Gilles Caulier

"Read from sidecar files" set, "write to sidecar files" set with the menu set to "Write to image and XMP sidecar".

$ ldd `which digikam` | grep exiv
        libexiv2.so.14 => /usr/lib/x86_64-linux-gnu/libexiv2.so.14 (0x00007f3ec8c90000)
Comment 4 caulier.gilles 2017-11-21 12:03:19 UTC
Note : digiKam 5.8.0 pre version bundles are just updated to https://files.kde.org/digikam/

Gilles Caulier
Comment 5 jon33040 2017-11-21 22:51:14 UTC
I just downloaded the 5.8.0 appimage (64-bit) and ran the same workflow as before. The results are the almost the same - a number of .xmp files which should not be there any more. The directory "Watermarked" was created on 5.7.0 and "Watermarked2" on the 5.8.0 appimage.

./Watermarked:
BatchTool-C15091-BatchTool-d15091-DSC07026_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC06997_v1_w.jpg
BatchTool-J15091-BatchTool-f15091-DSC07021_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC06997_v1_w.jpg.xmp
BatchTool-J15091-DSC07003_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07003_v1_w.jpg
BatchTool-M15091-BatchTool-J15091-DSC07003_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07003_v1_w.jpg.xmp
BatchTool-S15091-BatchTool-h15091-DSC07014_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07014_v1_w.jpg
BatchTool-T15091-BatchTool-Z15091-DSC07024_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07014_v1_w.jpg.xmp
BatchTool-Z15091-DSC07024_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07021_v1_w.jpg
BatchTool-d15091-DSC07026_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07021_v1_w.jpg.xmp
BatchTool-f15091-DSC07021_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07024_v1_w.jpg
BatchTool-h15091-DSC07014_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07024_v1_w.jpg.xmp
BatchTool-i15091-BatchTool-n15091-DSC06997_v1.PNG.digikamtempfile.PNG.digikamtempfile.jpg.xmp  DSC07026_v1_w.jpg
BatchTool-n15091-DSC06997_v1.PNG.digikamtempfile.PNG.xmp                                       DSC07026_v1_w.jpg.xmp

./Watermarked2:
BatchTool-C31562-a07c18de.digikamtempfile.jpg.xmp  BatchTool-Z31562-db570882.digikamtempfile.PNG.xmp  DSC06997_v1_w.jpg      DSC07014_v1_w.jpg.xmp
BatchTool-J31562-900fd444.digikamtempfile.PNG.xmp  BatchTool-d31562-110dc7de.digikamtempfile.PNG.xmp  DSC06997_v1_w.jpg.xmp  DSC07021_v1_w.jpg
BatchTool-M31562-ab050bbc.digikamtempfile.jpg.xmp  BatchTool-h31562-25d552ab.digikamtempfile.PNG.xmp  DSC07003_v1_w.jpg      DSC07021_v1_w.jpg.xmp
BatchTool-S31562-6e674ff9.digikamtempfile.jpg.xmp  BatchTool-i31562-83495cca.digikamtempfile.jpg.xmp  DSC07003_v1_w.jpg.xmp  DSC07024_v1_w.jpg
BatchTool-T31562-c45380ca.digikamtempfile.jpg.xmp  BatchTool-n31562-dab59807.digikamtempfile.PNG.xmp  DSC07014_v1_w.jpg      DSC07024_v1_w.jpg.xmp

The workflow is the following tools in Batch Queue Manager;
1) Apply Metadata Template
2) Convert To JPEG
3) Add Watermark
Comment 6 Maik Qualmann 2017-11-22 07:46:26 UTC
I can confirm it, the cause is a combination of writing the metadata in file and sidecar and convert to a new image format.

Maik
Comment 7 Maik Qualmann 2017-11-22 17:40:19 UTC
Git commit 04173b0c8803476077e1bc147143da8961922535 by Maik Qualmann.
Committed on 22/11/2017 at 17:39.
Pushed by mqualmann into branch 'master'.

use QFile::remove() and delete temporary sidecar files
FIXED-IN: 5.8.0

M  +2    -1    NEWS
M  +13   -14   utilities/queuemanager/manager/task.cpp

https://commits.kde.org/digikam/04173b0c8803476077e1bc147143da8961922535