[SOLVED] Lens correction module does not find my Tamron 17-50 zoom from exif data of Canon 80D

Lens correction module (Darktable 3.8.1) does not automatically apply the correction since it does not find the objective as described in exif data of the pictures from the camera.

Looking in the /var/lib/lensfun-updates/version_1/slr-tamron.xml (Ubuntu 20.04) the description more similar to my objective is:

Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF)

while in exif data is:

TAMRON SP 17-50mm f/2.8 Di II VC B005.

So I added a “new” lens in the file slr-tamron.xml with the right description as below:

TAMRON SP 17-50mm f/2.8 Di II VC B005

Now it works fine and lens correction apply the automatic correction.

The drawback I see is that when lensfun is updated, I will have to remember to add the “new” lens again. Is this the right way of work around the problem? Someone of you coped with this problem? How did you manage this problem?

You can use an ~/.exiv2 file to map the name. That’s how I take care of it.

According to my experience, exiv2 software fixes metadata of the images taken by the camera, not the metadata inside the camera. In other words, I should run exiv2 every time before importing images in Darktable. Am I correct?

no, exiv2 is a library used in darktable to read metadata.
for tweaking lens detection have a look at User's portal · darktable-org/darktable Wiki · GitHub

Very nice! Thank you to all.