View Issue Details

IDProjectCategoryView StatusLast Update
0008513libextractorpluginspublic2024-08-02 22:23
Reporterpinotree Assigned ToChristian Grothoff  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
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 22:22

manager   ~0022899

Fix committed to master branch.

Christian Grothoff

2024-08-02 22:22

manager   ~0022900

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

Related Changesets

libextractor: master 4de5650b

2024-08-03 00:22

Christian Grothoff


Details Diff
fix 0008513 as suggested by reporter Affected Issues
0008513
mod - src/plugins/test_exiv2.c Diff File

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
2024-07-31 00:59 Christian Grothoff Assigned To => Christian Grothoff
2024-07-31 00:59 Christian Grothoff Status new => assigned
2024-08-02 22:22 Christian Grothoff Changeset attached => libextractor master 4de5650b
2024-08-02 22:22 Christian Grothoff Note Added: 0022899
2024-08-02 22:22 Christian Grothoff Status assigned => resolved
2024-08-02 22:22 Christian Grothoff Resolution open => fixed
2024-08-02 22:22 Christian Grothoff Note Added: 0022900
2024-08-02 22:23 Christian Grothoff Fixed in Version => 1.14
2024-08-02 22:23 Christian Grothoff Target Version => 1.14