r57363 - in /trunk/libimage-size-perl/debian: changelog patches/imgsize-exit-code.patch patches/imgsize-fixes patches/series

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon May 3 12:36:49 UTC 2010


Author: jawnsy-guest
Date: Mon May  3 12:36:40 2010
New Revision: 57363

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57363
Log:
Update imgsize exit code patch

Added:
    trunk/libimage-size-perl/debian/patches/imgsize-exit-code.patch
Removed:
    trunk/libimage-size-perl/debian/patches/imgsize-fixes
Modified:
    trunk/libimage-size-perl/debian/changelog
    trunk/libimage-size-perl/debian/patches/series

Modified: trunk/libimage-size-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/changelog?rev=57363&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/changelog (original)
+++ trunk/libimage-size-perl/debian/changelog Mon May  3 12:36:40 2010
@@ -5,8 +5,9 @@
   * Standards-Version 3.8.4 (no changes)
   * Use new 3.0 (quilt) source format
   * Update copyright to new DEP5 format
-
- -- Jonathan Yu <jawnsy at cpan.org>  Mon, 03 May 2010 08:38:28 -0400
+  * Update imgsize exit code patch
+
+ -- Jonathan Yu <jawnsy at cpan.org>  Mon, 03 May 2010 09:12:04 -0400
 
 libimage-size-perl (3.220-1) unstable; urgency=low
 

Added: trunk/libimage-size-perl/debian/patches/imgsize-exit-code.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/patches/imgsize-exit-code.patch?rev=57363&op=file
==============================================================================
--- trunk/libimage-size-perl/debian/patches/imgsize-exit-code.patch (added)
+++ trunk/libimage-size-perl/debian/patches/imgsize-exit-code.patch Mon May  3 12:36:40 2010
@@ -1,0 +1,65 @@
+Description: exit with status code 0 on failure
+Author: Christoph Berg <myon at debian.org>
+Reviewed-by: Jonathan Yu <jawnsy at cpan.org>
+Origin: vendor
+Forwarded: no
+--- a/imgsize
++++ b/imgsize
+@@ -46,11 +46,13 @@
+ $opts{f} &&
+     ($rtn = \&return_fmt);
+ 
++my $error = 0;
++
+ if (@ARGV > 1)
+ {
+     foreach (@ARGV)
+     {
+-        printf "$_: %s\n", $rtn->($_);
++        print STDOUT sprintf("%s: %s\n", $_, $rtn->($_));
+     }
+ }
+ else
+@@ -58,7 +60,14 @@
+     printf "%s\n", $rtn->($ARGV[0]);
+ }
+ 
+-exit 0;
++exit $error;
++
++sub return_html
++{
++    my ($html) = html_imgsize($_[0]);
++
++    (defined $html) ? $html : ("error", $error = 1);
++}
+ 
+ sub return_attr
+ {
+@@ -67,7 +76,7 @@
+     my ($width, $height, $err) = imgsize($file);
+ 
+     return (defined $width) ?
+-        "(-width => $width, -height => $height)" : "error: $err";
++        "(-width => $width, -height => $height)" : ("error: $err", $error = 1);
+ }
+ 
+ sub return_imgsize
+@@ -76,7 +85,7 @@
+ 
+     my ($width, $height, $err) = imgsize($file);
+ 
+-    return (defined $width) ? "$width $height" : "error: $err";
++    return (defined $width) ? "$width $height" : ("error: $err", $error = 1);
+ }
+ 
+ sub return_fmt
+@@ -86,7 +95,7 @@
+     my ($width, $height, $err) = imgsize($file);
+ 
+     return (defined $width) ?
+-        sprintf($opts{f}, $width, $height, $err) : "error: $err";
++        sprintf($opts{f}, $width, $height, $err) : ("error: $err", $error = 1);
+ }
+ 
+ __END__

Modified: trunk/libimage-size-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimage-size-perl/debian/patches/series?rev=57363&op=diff
==============================================================================
--- trunk/libimage-size-perl/debian/patches/series (original)
+++ trunk/libimage-size-perl/debian/patches/series Mon May  3 12:36:40 2010
@@ -1,2 +1,2 @@
 disable-perl-critic.patch
-imgsize-fixes
+imgsize-exit-code.patch




More information about the Pkg-perl-cvs-commits mailing list