View Issue Details

IDProjectCategoryView StatusLast Update
0008513libextractorpluginspublic2026-05-25 10:48
Reporterpinotree Assigned ToChristian Grothoff Due Date
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.13 
Target Version1.14Fixed in Version1.14 
Summary0008513: test_exiv2 fails with Exiv2 0.28
DescriptionWhile the exiv2 plugin was fixed to build also with Exiv2 0.28 (0007889, 0007970), the test for that plugin (i.e "test_exiv2") still fails:

FAIL: test_exiv2
================

Warning: Directory Pentax, entry 0x0004: Data area exceeds data buffer, ignoring it.
Got additional meta data of type 38 and format 1 with value `28 deg 8' 17.58"' from plugin `exiv2'
Got additional meta data of type 40 and format 1 with value `14 deg 14' 21.71"' from plugin `exiv2'
Did not get expected meta data of type 38 and format 1 with value `28deg 8' (18|17.585)" ?' from plugin `exiv2'
Did not get expected meta data of type 40 and format 1 with value `14deg 14' (22|21.713)" ?' from plugin `exiv2'
FAIL test_exiv2 (exit status: 1)

There are a couple of formatting changes for the representation of GPS tags:
- there is a space before "deg"; this was changed in exiv2 with https://github.com/Exiv2/exiv2/commit/bdd23ae3284903366f3025cfb3e10c761e173c2f
- the precision of the decimals for the seconds is capped to 2; this was changed in exiv2 with https://github.com/Exiv2/exiv2/commit/77d31037eb9ec31f789b5ac16ea59b2b78113bb1

Hence, it is enough to tweak the regexps to match also the new GPS strings returned by Exiv2 0.28+; patched attached for it, which retains the compatibility with older Exiv2 versions (tested only with 0.27).
Steps To ReproduceBuild libextractor 1.13 using Exiv2 0.28, and also run the test suite.
Tagspatch
Attached Files
exiv2-0.28.diff (761 bytes)   
--- a/src/plugins/test_exiv2.c
+++ b/src/plugins/test_exiv2.c
@@ -49,8 +49,8 @@ main (int argc, char *argv[])
       EXTRACTOR_METATYPE_GPS_LATITUDE,
       EXTRACTOR_METAFORMAT_UTF8,
       "text/plain",
-      "28deg 8' (18|17.585)\" ?",
-      strlen ("28deg 8' (18|17.585)\" ?") + 1,
+      "28 ?deg 8' (18|17.585?)\" ?",
+      strlen ("28 ?deg 8' (18|17.585?)\" ?") + 1,
       0,
       .regex = 1
     },
@@ -66,8 +66,8 @@ main (int argc, char *argv[])
       EXTRACTOR_METATYPE_GPS_LONGITUDE,
       EXTRACTOR_METAFORMAT_UTF8,
       "text/plain",
-      "14deg 14' (22|21.713)\" ?",
-      strlen ("14deg 14' (22|21.713)\" ?"),
+      "14 ?deg 14' (22|21.713?)\" ?",
+      strlen ("14 ?deg 14' (22|21.713?)\" ?"),
       0,
       .regex = 1
     },
exiv2-0.28.diff (761 bytes)   

Activities

Christian Grothoff

2024-08-02 20:22

manager   ~0022899

Fix committed to master branch.

Christian Grothoff

2024-08-02 20:22

manager   ~0022900

Thanks, patch applied as suggested in 298bfeb..4de5650.

Issue History

Date ModifiedUsernameFieldChange
2024-02-25 11:23pinotreeNew Issue
2024-02-25 11:23pinotreeTag Attached: patch
2024-02-25 11:23pinotreeFile Added: exiv2-0.28.diff
2024-07-30 22:59Christian GrothoffAssigned To => Christian Grothoff
2024-07-30 22:59Christian GrothoffStatusnew => assigned
2024-08-02 20:22Christian Grothoff
2024-08-02 20:22Christian GrothoffNote Added: 0022899
2024-08-02 20:22Christian GrothoffStatusassigned => resolved
2024-08-02 20:22Christian GrothoffResolutionopen => fixed
2024-08-02 20:22Christian GrothoffNote Added: 0022900
2024-08-02 20:23Christian GrothoffFixed in Version => 1.14
2024-08-02 20:23Christian GrothoffTarget Version => 1.14
2026-05-25 10:48Christian GrothoffStatusresolved => closed