[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lintian: r26 - in trunk: . checks debian



Author: jeroen
Date: 2004-02-10 15:28:41 +0100 (Tue, 10 Feb 2004)
New Revision: 26

Modified:
   trunk/
   trunk/checks/menu-format
   trunk/checks/menu-format.desc
   trunk/debian/changelog
Log:
checks/menu-format
+ Drop menu-icon-has-bad-colors, it doesn't apply anymore (Closes: #199341)

I dropped the whole color-parsing bit, as it solely was meant to get the
colors. However, in the process it could have caused an parse error, which is
now not checked for anymore. As the parser is very limited, and would only
find very specific cases, I don't think it's worthwhile to retain it. A such
malformed .xpm is almost not possible unintentionally.



Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   + runtests


Modified: trunk/checks/menu-format
===================================================================
--- trunk/checks/menu-format	2004-02-09 11:48:44 UTC (rev 25)
+++ trunk/checks/menu-format	2004-02-10 14:28:41 UTC (rev 26)
@@ -76,67 +76,6 @@
 my %root_sections_hash;
 my %sections_hash;
 
-# icon_cmap keys are the colours permitted in an icon, as lower case
-# strings, either in hex like '#4c4c4c', or names from rgb.txt like
-# 'chartreuse1'.
-#
-# Can be automatically generated using ../rgb-vs-cmap
-
-my %icon_cmap = (
-   'none' => 1,
-   '#000000' => 1,
-   '#00007f' => 1,
-   '#0000ff' => 1,
-   '#007f00' => 1,
-   '#007f7f' => 1,
-   '#00ff00' => 1,
-   '#00ffff' => 1,
-   '#191919' => 1,
-   '#333333' => 1,
-   '#4c4c4c' => 1,
-   '#666667' => 1,
-   '#7f0000' => 1,
-   '#7f007f' => 1,
-   '#7f7f00' => 1,
-   '#7f7f7f' => 1,
-   '#999999' => 1,
-   '#b2b2b2' => 1,
-   '#cccccc' => 1,
-   '#e5e5e5' => 1,
-   '#ff0000' => 1,
-   '#ff00ff' => 1,
-   '#ffff00' => 1,
-   '#ffffff' => 1,
-   'white' => 1,
-   'black' => 1,
-   'blue' => 1,
-   'cyan' => 1,
-   'green' => 1,
-   'yellow' => 1,
-   'red' => 1,
-   'magenta' => 1,
-   'blue1' => 1,
-   'cyan1' => 1,
-   'green1' => 1,
-   'yellow1' => 1,
-   'red1' => 1,
-   'magenta1' => 1,
-   'gray0' => 1,
-   'grey0' => 1,
-   'gray20' => 1,
-   'grey20' => 1,
-   'gray50' => 1,
-   'grey50' => 1,
-   'gray60' => 1,
-   'grey60' => 1,
-   'gray80' => 1,
-   'grey80' => 1,
-   'gray90' => 1,
-   'grey90' => 1,
-   'gray100' => 1,
-   'grey100' => 1,
-);
-
 # -----------------------------------
 
 ($#ARGV == 1) or fail("syntax: menu-format <pkg> <type>");
@@ -455,41 +394,7 @@
 	print "E: $pkg $type: menu-icon-too-big $icon: ${width}x${height}\n";
     }
 
-    my $cppre = '';
-    foreach (1 .. $cpp) { $cppre .= '.'; }
-
-    my %bad;
-    foreach (1 .. $numcolours) {
-	$parse = "colour line $_";
-	do { defined ($line = <IN>) or goto parse_error; }
-        until ($line =~ /"$cppre\s*((m|s|g4|g|c)\s+[^ \t]+.*)"/);
-
-        # Notice whitespace is allowed in a colour name.  Not sure if that's
-        # strictly valid according to the xpm spec, but gnu.xpm from emacs20
-        # had some colours like that.
-        my $s = $1;
-        while ($s =~ /\s*(m|s|g4|g|c)\s+(.*?)\s*((m|s|g4|g|c)\s+.*|$)/) {
-            $s = $3;
-            my $c_orig = $2;
-            my $c = lc($c_orig);
-	    # reduce any 16-bit colours to 8 bits for matching
-            if ($c =~ /^#(..)00(..)00(..)00$/) {
-                $c = "#$1$2$3";
-            }
-            if (! defined $icon_cmap{$c}) {
-                $bad{$c_orig} = 1;
-            }
-	}
-        # expect to have processed everything in the colour string
-        if ($s ne '') {
-            $parse = "colour spec: $line";
-            goto parse_error;
-        }
-    }
     close IN or die;
-    if (%bad) {
-	print "E: $pkg $type: menu-icon-has-bad-colors $icon: ", join (', ', sort keys %bad), "\n";
-    }
     return;
 
 parse_error:

Modified: trunk/checks/menu-format.desc
===================================================================
--- trunk/checks/menu-format.desc	2004-02-09 11:48:44 UTC (rev 25)
+++ trunk/checks/menu-format.desc	2004-02-10 14:28:41 UTC (rev 26)
@@ -114,12 +114,6 @@
 Info: Icons in the Debian menu system should be at most 32x32 pixels.
 Ref: menu 3.4
 
-Tag: menu-icon-has-bad-colors
-Type: error
-Info: Icons in the Debian menu system should use only the 24 colors in
- <tt>/usr/share/pixmaps/cmap.xpm</tt>.
-Ref: menu 3.4
-
 Tag: menu-icon-cannot-parse
 Type: warning
 Info: The icon file could not be parsed.  Perhaps this means a bad XPM file,

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-02-09 11:48:44 UTC (rev 25)
+++ trunk/debian/changelog	2004-02-10 14:28:41 UTC (rev 26)
@@ -32,6 +32,8 @@
      + Based on patch by Denis Barbier <barbier@debian.org>, Closes: #210576
      + Check whether po-debconf is used at all, and warn if it isn't
      + Check for required POTFILES.in and template.pot in debian/po
+   * checks/menu-format
+     + Drop menu-icon-has-bad-colors, it doesn't apply anymore (Closes: #199341)
 
   Frank Lichtenheld <djpig@debian.org>
    * checks/debhelper:
@@ -49,7 +51,7 @@
      + fix testing of dependencies to eliminate false
        positives of missing-debconf-dependency (Closes: #195201)
 
- -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Mon,  9 Feb 2004 02:49:27 +0100
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Tue, 10 Feb 2004 15:14:45 +0100
 
 lintian (1.22.9) unstable; urgency=low
 



Reply to: