Skip Menu |

This queue is for tickets about the Graphics-TIFF CPAN distribution.

Report information
The Basics
Id: 122489
Status: resolved
Priority: 0/
Queue: Graphics-TIFF

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Failed test '-?' (2)
On my FreeBSD 10.3 smoker I see the following failure: ... # Failed test '-?' # at t/92_tiffinfo.t line 53. # got: 'tiffinfo: invalid option -- ? # LIBTIFF, Version 4.0.7 # Copyright (c) 1988-1996 Sam Leffler # Copyright (c) 1991-1996 Silicon Graphics, Inc. # # usage: tiffinfo [options] input... # where options are: # -D read data # -i ignore read errors # -c display data for grey/color response curve or colormap # -d display raw/decoded image data # -f lsb2msb force lsb-to-msb FillOrder for input # -f msb2lsb force msb-to-lsb FillOrder for input # -j show JPEG tables # -o offset set initial directory offset # -r read/display raw image data instead of decoded data # -s display strip offsets and byte counts # -w display raw data in words rather than bytes # -z enable strip chopping # -# set initial directory (first directory is # 0) # ' # expected: 'tiffinfo: illegal option -- ? # LIBTIFF, Version 4.0.7 # Copyright (c) 1988-1996 Sam Leffler # Copyright (c) 1991-1996 Silicon Graphics, Inc. # # usage: tiffinfo [options] input... # where options are: # -D read data # -i ignore read errors # -c display data for grey/color response curve or colormap # -d display raw/decoded image data # -f lsb2msb force lsb-to-msb FillOrder for input # -f msb2lsb force msb-to-lsb FillOrder for input # -j show JPEG tables # -o offset set initial directory offset # -r read/display raw image data instead of decoded data # -s display strip offsets and byte counts # -w display raw data in words rather than bytes # -z enable strip chopping # -# set initial directory (first directory is # 0) # ' # Looks like you failed 1 test of 15. ... Same problem exists with the t/93_tiff2pdf.t test.
Does this patch fix things?
Subject: 0001-invalid-illegal-in-error-messages-in-tiffinfo.pl-and.patch
From 34766855cbd4f64d6b05e82c912904a9e8db552e Mon Sep 17 00:00:00 2001 From: Jeffrey Ratcliffe <jffry@posteo.net> Date: Sat, 15 Jul 2017 19:11:47 +0200 Subject: [PATCH] invalid->illegal in error messages in tiffinfo.pl and tiff2pdf.pl for freebsd to fix RT 122489 --- Changes | 2 ++ examples/tiff2pdf.pl | 7 ++++++- examples/tiffinfo.pl | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 2f4faab..3dac9bf 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,8 @@ Revision history for Perl extension Graphics::TIFF. & tiff2pdf not installed to fix RT 122486 - use Test::Deeply::num to fix test failures due to rounding in 1.t and fix RT 122488 + - invalid->illegal in error messages in tiffinfo.pl and tiff2pdf.pl for + freebsd to fix RT 122489 2 Fri, 14 Jul 2017 19:30 +0200 - fix GetFieldDefaulted(TIFFTAG_EXTRASAMPLES) diff --git a/examples/tiff2pdf.pl b/examples/tiff2pdf.pl index fe13bba..7a0b32d 100644 --- a/examples/tiff2pdf.pl +++ b/examples/tiff2pdf.pl @@ -293,7 +293,12 @@ sub getopt { if ( defined $1 ) { $optarg = $ARGV[ $optind++ ] } } else { - warn "$TIFF2PDF_MODULE: invalid option -- $c\n"; + if ( $OSNAME eq 'freebsd' ) { + warn "$TIFF2PDF_MODULE: illegal option -- $c\n"; + } + else { + warn "$TIFF2PDF_MODULE: invalid option -- $c\n"; + } usage(); } } diff --git a/examples/tiffinfo.pl b/examples/tiffinfo.pl index a21716d..626cf5b 100644 --- a/examples/tiffinfo.pl +++ b/examples/tiffinfo.pl @@ -4,6 +4,7 @@ use strict; use Graphics::TIFF ':all'; use feature 'switch'; no if $] >= 5.018, warnings => 'experimental::smartmatch'; +use English qw( -no_match_vars ); use Readonly; Readonly my $EXIT_ERROR => -1; @@ -90,7 +91,12 @@ sub getopt { if ( defined $1 ) { $optarg = $ARGV[ $optind++ ] } } else { - warn "tiffinfo: invalid option -- $c\n"; + if ( $OSNAME eq 'freebsd' ) { + warn "tiffinfo: illegal option -- $c\n"; + } + else { + warn "tiffinfo: invalid option -- $c\n"; + } usage(); } } -- 2.13.2
On 2017-07-15 13:13:57, RATCLIFFE wrote: Show quoted text
> Does this patch fix things?
Yes.
Thanks. I'll upload it as v3, then.