[Mud-builder-commits] r263 - trunk/lib/MUD

jaffa at garage.maemo.org jaffa at garage.maemo.org
Tue Jan 20 16:58:11 EET 2009


Author: jaffa
Date: 2009-01-20 16:58:09 +0200 (Tue, 20 Jan 2009)
New Revision: 263

Modified:
   trunk/lib/MUD/Package.pm
Log:
#3352: Fix builds for iconless packages. Reported by Graham Cobb

Modified: trunk/lib/MUD/Package.pm
===================================================================
--- trunk/lib/MUD/Package.pm	2009-01-20 00:53:15 UTC (rev 262)
+++ trunk/lib/MUD/Package.pm	2009-01-20 14:58:09 UTC (rev 263)
@@ -188,17 +188,15 @@
     system('wget', '-O', $iconFile, $self->{data}->{deb}->{icon});
   }
   
-  if ($iconFile !~ /-$size\b/) {
+  if (-f $iconFile and $iconFile !~ /-$size\b/) {
     my $sourceIcon = $iconFile;
     (undef, $iconFile) = tempfile("mud-$self->{name}-XXXXX", SUFFIX => ".png", UNLINK => 1, DIR => File::Spec->tmpdir);
     print "+++ Converting [$sourceIcon] to [$iconFile] at ${size}px WxH\n";
     system('convert', $sourceIcon, '-resize', "${size}x${size}", $iconFile);
     copy($sourceIcon, $iconFile) or die "copy failed: $!" unless -s $iconFile;
-  } else {
-    print "+++ Found icon [$iconFile] at ${size} pixels WxH\n";
   }
   
-  return undef unless -s $iconFile;
+  return undef unless $iconFile and -s $iconFile;
   return $iconFile;
 }
 



More information about the Mud-builder-commits mailing list