Package: imageindex
Severity: grave
Tags: patch
Justification: renders package unusable

Hi,

when calling imageindex you get only

Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at 
/usr/bin/imageindex line 2506.

The attached patch fixes this.

BTW, the packaging itself seems quite outdated.  I'd volunteer to inject
the packaging into pkg-phototools Git and to team maintain the package.
If I do not hear anything from the maintainer I assume he agrees and will
proceed that way.

Kind regards

      Andreas.


-- System Information:
Debian Release: 8.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Author: Kevin Oberman rkoberman at gmail.com
Last-Update: Tue Mar 4 04:44:42 UTC 2014
Origin: https://lists.freebsd.org/pipermail/freebsd-ports/2014-March/090447.html
Description: Adapt to perl 5.22

--- a/imageindex
+++ b/imageindex
@@ -329,7 +329,7 @@ use File::Basename;
 use File::Copy;
 use English;
 use Carp;
-require 'flush.pl';
+use IO::Handle;
 
 # to shut up -w
 use vars qw($opt_recurse);
@@ -527,7 +527,7 @@ my $mplayer_prog = &find_in_path ('mplay
 
 # Extract info
 print "Extracting image info";
-flush (STDOUT);
+STDOUT->flush();
 
 foreach my $file (@files) {
 
@@ -1712,7 +1712,7 @@ sub extract_file_info {
 	# at the user so that the video regexp might be adjusted
 	if ($retval == -1) {
 	    print "\nwarning: $pathname identified by extension as video file but mplayer doesn't recognize it\n";
-	    flush (STDOUT);
+	    STDOUT->flush();
 	}
     } else  {
 	&extract_image_info ($filename);
@@ -1735,15 +1735,15 @@ sub extract_movie_info {
     my ($arate, $anch, $length, $is_video);
 
     print ".";
-    flush (STDOUT);
+    STDOUT->flush();
 
     if ($mplayer_prog eq '' || ($do_video_files == 0)) {
 	if (($do_video_files != 0) && $mplayer_prog eq '') {
 	    print "\nwarning: Trying to process video files but cannot find mplayer in \$path!\n";
-	    flush (STDOUT);
+	    STDOUT->flush();
 	}
 	print "\nSkipping $pathname";
-	flush (STDOUT);
+	STDOUT->flush();
 	return 0;
     } else {
 	$object_counter++;
@@ -1897,14 +1897,14 @@ sub extract_image_info {
     my $i;
 
     print ".";
-    flush (STDOUT);
+    STDOUT->flush();
 
     $retval = $image->Read($pathname);
 
 
     if ($retval ne "") {
 	print "\nSkipping $pathname";
-	flush (STDOUT);
+	STDOUT->flush();
 	return;
     } else {
 	$object_counter++;
@@ -2302,7 +2302,7 @@ sub page_header {
     if (defined($lastdate)) {
 	print "<META NAME=\"$enddatemetatag\" CONTENT=\"$lastdate\">\n";
     }
-    if (!defined ($opt_includeall) && defined (@opt_exclude) && scalar (@opt_exclude)) {
+    if (!defined ($opt_includeall) && @opt_exclude && scalar (@opt_exclude)) {
 	my $tmp = join (',', @opt_exclude);
 	my $etmp;
 
@@ -2315,7 +2315,7 @@ sub page_header {
     }
     printf ("<META NAME=\"$numimagesmetatag\" CONTENT=\"%d\">\n", $image_counter);
 
-    if (defined (@opt_skipmont) && scalar (@opt_skipmont)) {
+    if ( @opt_skipmont && scalar (@opt_skipmont)) {
 	my $tmp = join (',', @opt_skipmont);
 	printf ("<META NAME=\"$skipmetatag\" CONTENT=\"%s\">\n", $tmp);
     }
@@ -2479,7 +2479,7 @@ sub exclude_files {
     # then process. Check to see if any of the -skipmont options were given as
     # strings of filenames concatenated with ',' characters. If so, support it.
     #
-    if (defined (@opt_skipmont)) {
+    if (@opt_skipmont) {
 	foreach (@opt_skipmont) {
 	    (@tokens) = split (/,/, $_);
 	    foreach $token (@tokens) {
@@ -2503,7 +2503,7 @@ sub exclude_files {
     # then process. Check to see if any of the -exclude options were given as
     # strings of filenames concatenated with ',' characters. If so, support it.
     #
-    if (defined (@opt_exclude)) {
+    if (@opt_exclude) {
 	# -includeall takes priority over -exclude on the commandline if they are
 	# used together (wierd, but ...)
 	#

Reply via email to