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

lintian: r58 - branches/1.22.11+udeb/checks



Author: djpig
Date: 2004-02-22 16:24:32 +0100 (Sun, 22 Feb 2004)
New Revision: 58

Modified:
   branches/1.22.11+udeb/checks/common_data.pm
   branches/1.22.11+udeb/checks/control-files
   branches/1.22.11+udeb/checks/control-files.desc
   branches/1.22.11+udeb/checks/debconf.desc
   branches/1.22.11+udeb/checks/description.desc
   branches/1.22.11+udeb/checks/fields
   branches/1.22.11+udeb/checks/fields.desc
Log:
Some first checks "ported" to udebs


Modified: branches/1.22.11+udeb/checks/common_data.pm
===================================================================
--- branches/1.22.11+udeb/checks/common_data.pm	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/common_data.pm	2004-02-22 15:24:32 UTC (rev 58)
@@ -3,7 +3,7 @@
 package common_data;
 use base qw(Exporter);
 @EXPORT=qw(%known_archs %known_sections %known_non_us_parts %known_archive_parts
-           %known_prios %known_source_fields %known_binary_fields
+           %known_prios %known_source_fields %known_binary_fields %known_udeb_fields
 	   %known_obsolete_fields %known_essential %known_build_essential
 	   %known_obsolete_packages %known_virtual_packages
 	   %known_libstdcs %known_tcls %known_tclxs %known_tks %known_tkxs
@@ -44,6 +44,12 @@
      'replaces', 'essential', 'maintainer', 'section', 'priority',
      'source', 'description', 'installed-size');
 
+%known_udeb_fields = map { $_ => 1 }
+    ('package', 'version', 'architecture', 'subarchitecture', 'depends',
+     'recommends', 'enhances', 'provides', 'installer-menu-item',
+     'replaces', 'maintainer', 'section', 'priority',
+     'source', 'description', 'installed-size');
+
 %known_obsolete_fields = map { $_ => 1 }
     ('revision', 'package-revision', 'package_revision',
      'recommended', 'optional', 'class');

Modified: branches/1.22.11+udeb/checks/control-files
===================================================================
--- branches/1.22.11+udeb/checks/control-files	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/control-files	2004-02-22 15:24:32 UTC (rev 58)
@@ -25,7 +25,7 @@
 my $pkg = shift;
 my $type = shift;
 
-my %ctrl =
+my %ctrl_deb =
     (
      'config', 0755,
      'control', 0644,
@@ -39,6 +39,19 @@
      'templates', 0644,
     );
 
+my %ctrl_udeb =
+    (
+     'config', 0755,
+     'control', 0644,
+     'isinstallable', 0755,
+     'menutest', 0755,
+     'postinst', 0755,
+     'shlibs', 0644,
+     'templates', 0644,
+    );
+
+my %ctrl = $type eq 'udeb' ? %ctrl_udeb : %ctrl_deb;
+
 # process control-index file
 open(IN,"control-index") or fail("cannot open control-index file: $!");
 while (<IN>) {
@@ -56,7 +69,7 @@
     next if $file eq './';
 
     # valid control file?
-    unless (exists $ctrl{$file}) {
+    unless ( exists $ctrl{$file} ) {
 	print "E: $pkg $type: unknown-control-file $file\n";
 	next;
     }

Modified: branches/1.22.11+udeb/checks/control-files.desc
===================================================================
--- branches/1.22.11+udeb/checks/control-files.desc	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/control-files.desc	2004-02-22 15:24:32 UTC (rev 58)
@@ -2,7 +2,7 @@
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: ctl
 Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 
 Tag: unknown-control-file

Modified: branches/1.22.11+udeb/checks/debconf.desc
===================================================================
--- branches/1.22.11+udeb/checks/debconf.desc	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/debconf.desc	2004-02-22 15:24:32 UTC (rev 58)
@@ -2,7 +2,7 @@
 Author: Colin Watson <cjw44@flatline.org.uk>
 Abbrev: dc
 Standards-Version: 3.5.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Info: This looks for common mistakes in packages using debconf.
 Needs-Info: scripts

Modified: branches/1.22.11+udeb/checks/description.desc
===================================================================
--- branches/1.22.11+udeb/checks/description.desc	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/description.desc	2004-02-22 15:24:32 UTC (rev 58)
@@ -2,7 +2,7 @@
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: des
 Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 
 Tag: package-has-no-description

Modified: branches/1.22.11+udeb/checks/fields
===================================================================
--- branches/1.22.11+udeb/checks/fields	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/fields	2004-02-22 15:24:32 UTC (rev 58)
@@ -34,6 +34,12 @@
 use lib "$ENV{'LINTIAN_ROOT'}/checks";
 use common_data; # my data in checks/
 
+if ($type eq 'udeb') {
+    %known_sections = ( 'debian-installer' => 1 );
+    %known_non_us_parts = ();
+    %known_archive_parts = ();
+}
+
 # Complex regexps used more than once
 my $package_re = "[A-Za-z0-9][A-Za-z0-9+.-]+";
 my $version_re = "([0-9]+:)?([0-9a-zA-Z][0-9a-zA-Z+.:\-]*?)(-[0-9a-zA-Z+.]+)?";
@@ -118,6 +124,22 @@
     }
 }
 
+if (open(IN, "fields/subarchitecture")) {
+    chop($_ = <IN>);
+    my @subarchs = split;
+    close(IN);
+
+    single_line('subarchitecture', $_);
+}
+
+if (open(IN, "fields/installer-menu-item")) {
+    chop($_ = <IN>);
+    my @subarchs = split;
+    close(IN);
+
+    single_line('subarchitecture', $_);
+}
+
 if (not open(IN, "fields/maintainer")) {
     tag_error("no-maintainer-field");
 } else {
@@ -269,7 +291,7 @@
     }
 }
 
-if ($type eq 'binary') {
+if (($type eq 'binary') || ($type eq 'udeb')) {
     for my $fld ('depends', 'pre-depends', 'recommends', 'suggests',
 		 'conflicts', 'provides', 'replaces') {
 	next if not open(IN, "fields/$fld");
@@ -299,8 +321,9 @@
 	    my $versioned;
 
 	    if ($#alternates >= 1) {
-		if ($fld ne 'depends' and $fld ne 'recommends' and
-		    $fld ne 'suggests' and $fld ne 'pre-depends') {
+		if ( ($type eq 'udeb') || 
+		     ($fld ne 'depends' and $fld ne 'recommends' and
+		    $fld ne 'suggests' and $fld ne 'pre-depends')) {
 		    tag_error("alternates-not-allowed", "$fld:", $conj);
 		}
 	    }
@@ -531,6 +554,9 @@
     } elsif ($type eq 'binary' and (not exists $known_binary_fields{$_} or
 	     not defined $known_binary_fields{$_})) {
 	tag_info("unknown-field-in-control", $_);
+    } elsif ($type eq 'udeb' and (not exists $known_udeb_fields{$_} or
+	     not defined $known_udeb_fields{$_})) {
+	tag_info("unknown-field-in-control", $_);
     }
 }
 

Modified: branches/1.22.11+udeb/checks/fields.desc
===================================================================
--- branches/1.22.11+udeb/checks/fields.desc	2004-02-22 14:01:29 UTC (rev 57)
+++ branches/1.22.11+udeb/checks/fields.desc	2004-02-22 15:24:32 UTC (rev 58)
@@ -2,7 +2,7 @@
 Author: Richard Braakman <dark@xs4all.nl>
 Abbrev: fld
 Standards-Version: 3.2.0
-Type: binary, source
+Type: binary, udeb, source
 Unpack-Level: 1
 Info: This script checks the syntax of the fields in package control files,
  as described in the Policy Manual.
@@ -70,6 +70,11 @@
  package.
 Ref: policy 5.6.7
 
+Tag: bad-menu-item
+Type: error
+Info: The field Installer-Menu-Item should only contain positive integer
+ values.
+
 Tag: no-maintainer-field
 Type: error
 Info: The package does not have a `Maintainer:' field in its control file.
@@ -219,6 +224,8 @@
 Type: error
 Info: Only the `Depends', `Recommends', `Suggests' and `Pre-Depends'
  fields may specify alternate dependencies using the `|' symbol.
+ .
+ In udeb packages alternates are generally disallowed.
 Ref: policy 7.1
 
 Tag: versioned-provides



Reply to: