View Issue Details

IDProjectCategoryView StatusLast Update
0008513libextractorpluginspublic2024-02-25 12:23
Reporterpinotree Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version1.13 
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

Issue History

Date Modified Username Field Change
2024-02-25 12:23 pinotree New Issue
2024-02-25 12:23 pinotree Tag Attached: patch
2024-02-25 12:23 pinotree File Added: exiv2-0.28.diff