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

lintian: r113 - in trunk: checks collection debian frontend lib man unpack



Author: djpig
Date: 2004-03-27 21:48:18 +0100 (Sat, 27 Mar 2004)
New Revision: 113

Added:
   trunk/unpack/list-udebpkg
Modified:
   trunk/checks/binaries
   trunk/checks/binaries.desc
   trunk/checks/common_data.pm
   trunk/checks/control-files
   trunk/checks/control-files.desc
   trunk/checks/deb-format.desc
   trunk/checks/debconf
   trunk/checks/debconf.desc
   trunk/checks/description
   trunk/checks/description.desc
   trunk/checks/fields
   trunk/checks/fields.desc
   trunk/checks/files
   trunk/checks/files.desc
   trunk/checks/shared-libs
   trunk/checks/shared-libs.desc
   trunk/checks/spelling.desc
   trunk/collection/file-info.desc
   trunk/collection/md5sums.desc
   trunk/collection/objdump-info.desc
   trunk/collection/override-file.desc
   trunk/collection/scripts.desc
   trunk/debian/changelog
   trunk/frontend/lintian
   trunk/lib/Read_pkglists.pm
   trunk/man/lintian.1
Log:
Merge in udeb support from branch 1.22.11+udeb r48:112
(Closes: #216117)


Modified: trunk/checks/binaries
===================================================================
--- trunk/checks/binaries	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/binaries	2004-03-27 20:48:18 UTC (rev 113)
@@ -153,6 +153,7 @@
 
     # binary or shared object?
     next unless ($info =~ m/executable/) or ($info =~ m/shared object/);
+    next if $type eq 'udeb';
 
     # statically linked?
     my %libc5_binary;

Modified: trunk/checks/binaries.desc
===================================================================
--- trunk/checks/binaries.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/binaries.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,7 +2,7 @@
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: bin
 Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 Needs-Info: objdump-info, file-info
 Info: This script checks binaries and object files for bugs.

Modified: trunk/checks/common_data.pm
===================================================================
--- trunk/checks/common_data.pm	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/common_data.pm	2004-03-27 20:48:18 UTC (rev 113)
@@ -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: trunk/checks/control-files
===================================================================
--- trunk/checks/control-files	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/control-files	2004-03-27 20:48:18 UTC (rev 113)
@@ -25,7 +25,7 @@
 my $pkg = shift;
 my $type = shift;
 
-my %ctrl =
+my %ctrl_deb =
     (
      'config', 0755,
      'control', 0644,
@@ -39,6 +39,20 @@
      '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;
+my %ctrl_alt = $type eq 'udeb' ? %ctrl_deb : %ctrl_udeb;
+
 # process control-index file
 open(IN,"control-index") or fail("cannot open control-index file: $!");
 while (<IN>) {
@@ -56,9 +70,14 @@
     next if $file eq './';
 
     # valid control file?
-    unless (exists $ctrl{$file}) {
-	print "E: $pkg $type: unknown-control-file $file\n";
-	next;
+    unless ( exists $ctrl{$file} ) {
+	if ( exists $ctrl_alt{$file} ) {
+	    print "E: $pkg $type: not-allowed-control-file $file\n";
+	    next;
+	} else {
+	    print "E: $pkg $type: unknown-control-file $file\n";
+	    next;
+	}
     }
 
     # skip `control' control file (that's an exception: dpkg doesn't care and

Modified: trunk/checks/control-files.desc
===================================================================
--- trunk/checks/control-files.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/control-files.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -1,8 +1,8 @@
 Check-Script: control-files
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: ctl
-Standards-Version: 3.2.0
-Type: binary
+Standards-Version: 3.6.1
+Type: binary, udeb
 Unpack-Level: 1
 
 Tag: unknown-control-file
@@ -10,6 +10,13 @@
 Info: The package contains an `unknown' control file, which should be
  removed.
 
+Tag: not-allowed-control-file
+Type: error
+Info: The package contains a control file that is not allowed in this
+ type of package. Some control files are only allowed in either .deb
+ or .udeb packages and must not be included in packages of the other
+ type. You should probably just remove the file.
+
 Tag: control-file-has-bad-permissions
 Type: error
 Info: The postinst, postrm, preinst, and prerm control files should use

Modified: trunk/checks/deb-format.desc
===================================================================
--- trunk/checks/deb-format.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/deb-format.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,7 +2,7 @@
 Author: Denis Barbier <barbier@linuxfr.org>
 Abbrev: dfmt
 Standards-Version: 3.6.1
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 Info: This script checks if a binary package was build using a broken version
  of tar (i.e., containing bug#230910)

Modified: trunk/checks/debconf
===================================================================
--- trunk/checks/debconf	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/debconf	2004-03-27 20:48:18 UTC (rev 113)
@@ -47,6 +47,7 @@
 	text
 	title
 	);
+$valid_types{error} = 1 if $type eq 'udeb';
 
 my $seenconfig='';
 my $seentemplates='';
@@ -65,7 +66,7 @@
 # Check that both debconf control area files are present.
 if ($seenconfig and not $seentemplates) {
     print "W: $pkg $type: no-debconf-templates\n";
-} elsif ($seentemplates and not $seenconfig) {
+} elsif ($seentemplates and not $seenconfig and $type ne 'udeb') {
     print "W: $pkg $type: no-debconf-config\n";
 }
 
@@ -153,13 +154,19 @@
     if (-f "fields/$field") {
 	open(IN, "fields/$field") or fail("Can't open fields/$field: $!");
 	chomp($_ = <IN>);
+	$_ .= ", $version" if defined $version;
 	$_ =~ s/debconf-2\.0/debconf (>= 1.2.30)/go;
-	$_ .= ", $version" if defined $version;
-	push @alldeps, $_;
+	$_ =~ s/cdebconf(-\w+)?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+	$_ =~ s/libdebconfclient.?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+        push @alldeps, $_;
 	$dependencies{$field} = Dep::parse($_);
     } else {
-	push @alldeps, $version;
-	$dependencies{$field} = Dep::parse($version);
+	my $dep = $version;
+	$dep =~ s/debconf-2\.0/debconf (>= 1.2.30)/go;
+	$dep =~ s/cdebconf(-\w+)?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+	$dep =~ s/libdebconfclient.?(-udeb)?\s*(\(.+?\))?/debconf (>= 1.2.30)/g;
+	push @alldeps, $dep;
+	$dependencies{$field} = Dep::parse($dep);
     }
 }
 
@@ -187,6 +194,9 @@
 	my $isdefault='';
 	my $usesseen='';
 
+	my $fl = <IN>;
+	next if $fl !~ /^#!/; # skip, if not a script
+
 	while (<IN>) {
 	    s/#.*//;    # Not perfect for Perl, but should be OK
 	    next unless m/\S/;
@@ -203,7 +213,8 @@
 	    }
 	    if ($file eq 'postinst' and not $db_input and m/db_input/) {
 	        # TODO: Perl?
-	        print "W: $pkg $type: postinst-uses-db-input\n";
+	        print "W: $pkg $type: postinst-uses-db-input\n"
+		    unless $type eq 'udeb';
 	        $db_input=1;
 	    }
 	    if (not $isdefault and m/db_fset.*isdefault/) {
@@ -214,14 +225,16 @@
 	    if (not $usesseen and m/db_f[sg]et\s+\S+\s+seen\s+/) {
 	       unless (Dep::implies($alldependencies,
 	                 Dep::parse('debconf (>= 0.5)'))) {
-	           print "E: $pkg $type: seen-flag-requires-versioned-depends $file\n";
+	           print "E: $pkg $type: seen-flag-requires-versioned-depends $file\n" 
+		       unless $type eq 'udeb';
 	       }
 	        $usesseen = 1;
 	    }
 	}
 
 	unless ($usesconfmodule) {
-	    print "W: $pkg $type: $file-does-not-load-confmodule\n";
+	    print "W: $pkg $type: $file-does-not-load-confmodule\n" 
+		unless $type eq 'udeb';
 	}
 
 	close IN;
@@ -248,13 +261,15 @@
 if ($usesmultiselect) {
     unless (Dep::implies($alldependencies,
 	                 Dep::parse('debconf (>= 0.2.26)'))) {
-	print "W: $pkg $type: multiselect-without-dependency\n";
+	print "W: $pkg $type: multiselect-without-dependency\n"
+	    unless $type eq 'udeb';
     }
 } elsif ($usespreinst) {
     unless (Dep::implies($dependencies{'pre-depends'},
 	                 Dep::parse('debconf (>= 0.2.17)'))
 	    or Dep::implies($dependencies{'depends'}, Dep::parse('debconf'))) {
-	print "W: $pkg $type: missing-debconf-dependency-for-preinst\n";
+	print "W: $pkg $type: missing-debconf-dependency-for-preinst\n"
+	    unless $type eq 'udeb';
     }
 } else {
     unless (Dep::implies($alldependencies, Dep::parse('debconf'))) {
@@ -268,7 +283,7 @@
 # the following checks is ignored if the package being checked is debconf
 # itself.
 
-exit 0 if $pkg eq "debconf";
+exit 0 if ($pkg eq "debconf") || ($type eq 'udeb');
 
 open(SCRIPTS, "scripts") or fail("cannot open lintian scripts file: $!");
 while (<SCRIPTS>) {

Modified: trunk/checks/debconf.desc
===================================================================
--- trunk/checks/debconf.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/debconf.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -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: trunk/checks/description
===================================================================
--- trunk/checks/description	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/description	2004-03-27 20:48:18 UTC (rev 113)
@@ -121,7 +121,7 @@
 close(IN);
 
 if ($lines == 0) {
-    print "E: $pkg $type: extended-description-is-empty\n";
+    print "E: $pkg $type: extended-description-is-empty\n" unless $type eq 'udeb';
 }
 
 exit 0;

Modified: trunk/checks/description.desc
===================================================================
--- trunk/checks/description.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/description.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -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: trunk/checks/fields
===================================================================
--- trunk/checks/fields	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/fields	2004-03-27 20:48:18 UTC (rev 113)
@@ -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>);
+    /^\d+$/ || tag_error("bad-menu-item");
+    close(IN);
+
+    single_line('installer-menu-item', $_);
+}
+
 if (not open(IN, "fields/maintainer")) {
     tag_error("no-maintainer-field");
 } else {
@@ -252,7 +274,7 @@
     return 1;
 }
 
-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");
@@ -513,6 +535,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: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/fields.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -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.

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/files	2004-03-27 20:48:18 UTC (rev 113)
@@ -105,11 +105,11 @@
 	    print "E: $pkg $type: config-file-reserved $file by libpam-runtime\n";
 	}
 	# ---------------- /etc/rc.d
-	elsif ($file =~ m,^etc/rc\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
+	elsif ($type ne 'udeb' and $file =~ m,^etc/rc\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
 	    print "E: $pkg $type: package-installs-into-etc-rc.d $file\n";
 	}
 	# ---------------- /etc/rc?.d
-	elsif ($file =~ m,^etc/rc(\d|S)\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
+	elsif ($type ne 'udeb' and $file =~ m,^etc/rc(\d|S)\.d/\S, and $pkg !~ /^(sysvinit|file-rc)$/) {
 	    print "E: $pkg $type: package-installs-into-etc-rc.d $file\n";
 	}
 	# ---------------- /etc/rc.boot
@@ -135,46 +135,50 @@
     elsif ($file =~ m,^usr/,) {
 	# ---------------- /usr/share/doc
 	if ($file =~ m,^usr/share/doc/\S,) {
-	    # file not owned by root?
-	    if ($owner ne 'root/root') {
-		print "E: $pkg $type: bad-owner-for-doc-file $file $owner != root/root\n";
-	    }
-
-	    # file directly in /usr/share/doc ?
-	    if ($perm =~ m/^-/ and $file =~ m,^usr/share/doc/[^/]+$,) {
-		print "E: $pkg $type: file-directly-in-usr-share-doc $file\n";
-	    }
-
-	    # executable in /usr/share/doc ?
-	    if ($perm =~ m/^-.*[xs]/ and $file !~ m,^usr/share/doc/([^/]+/)?examples/,) {
-		if ($script{$file}) {
-		    print "I: $pkg $type: script-in-usr-share-doc $file\n";
-		} else {
-		    print "E: $pkg $type: executable-in-usr-share-doc $file " . (sprintf "%04o\n", $operm);
+	    if ($type eq 'udeb') {
+		print "E: $pkg $type: documentation-file $file\n";
+	    } else {
+		# file not owned by root?
+		if ($owner ne 'root/root') {
+		    print "E: $pkg $type: bad-owner-for-doc-file $file $owner != root/root\n";
 		}
-	    }
+		
+		# file directly in /usr/share/doc ?
+		if ($perm =~ m/^-/ and $file =~ m,^usr/share/doc/[^/]+$,) {
+		    print "E: $pkg $type: file-directly-in-usr-share-doc $file\n";
+		}
+		
+		# executable in /usr/share/doc ?
+		if ($perm =~ m/^-.*[xs]/ and $file !~ m,^usr/share/doc/([^/]+/)?examples/,) {
+		    if ($script{$file}) {
+			print "I: $pkg $type: script-in-usr-share-doc $file\n";
+		    } else {
+			print "E: $pkg $type: executable-in-usr-share-doc $file " . (sprintf "%04o\n", $operm);
+		    }
+		}
+		
+		# zero byte file in /usr/share/doc/
+		if ($size == 0 and $perm =~ m,^-,) {
+		    # exception: __init__.py files are empty tagging files (see
+		    # bug #215234)
+		    unless ($file =~ m,^usr/share/doc/([^/]+/)?examples/(.+/)?__init__\.py$,) {
+			print "W: $pkg $type: zero-byte-file-in-doc-directory $file\n";
+		    }
+		}
 
-	    # zero byte file in /usr/share/doc/
-	    if ($size == 0 and $perm =~ m,^-,) {
-		# exception: __init__.py files are empty tagging files (see
-		# bug #215234)
-		unless ($file =~ m,^usr/share/doc/([^/]+/)?examples/(.+/)?__init__\.py$,) {
-		    print "W: $pkg $type: zero-byte-file-in-doc-directory $file\n";
+		# override files have moved
+		my $tmp = quotemeta($pkg);
+		if ($file =~ m,^usr/share/doc/$tmp/override\.[lL]intian(\.gz)?$,) {
+		    print "E: $pkg $type: override-file-in-wrong-location $file\n";
+		} elsif ($file =~ m,^usr/share/lintian/overrides/$tmp/.*,) {
+		    print "E: $pkg $type: override-file-in-wrong-location $file\n";
 		}
+		
+		# contains an INSTALL file?
+		if ($file =~ m,^usr/share/doc/$tmp/INSTALL(?:\..+)*$,) {
+		    print "W: $pkg $type: package-contains-upstream-install-documentation $file\n";
+		}
 	    }
-
-	    # override files have moved
-	    my $tmp = quotemeta($pkg);
-	    if ($file =~ m,^usr/share/doc/$tmp/override\.[lL]intian(\.gz)?$,) {
-		print "E: $pkg $type: override-file-in-wrong-location $file\n";
-	    } elsif ($file =~ m,^usr/share/lintian/overrides/$tmp/.*,) {
-		print "E: $pkg $type: override-file-in-wrong-location $file\n";
-	    }
-
-	    # contains an INSTALL file?
-	    if ($file =~ m,^usr/share/doc/$tmp/INSTALL(?:\..+)*$,) {
-		print "W: $pkg $type: package-contains-upstream-install-documentation $file\n";
-	    }
 	}
 	# ---------------- /usr/doc
 	elsif ($file =~ m,^usr/doc/\S,) {
@@ -208,7 +212,7 @@
 	}
 	# ---------------- /usr/lib -- needs to go after the other usr/lib/*
 	elsif ($file =~ m,^usr/lib/,) {
-	    if ($file =~ m,\.(gif|jpeg|jpg|png|tiff|xpm|xbm)$, and not defined $link) {
+	    if ($type ne 'udeb' and $file =~ m,\.(gif|jpeg|jpg|png|tiff|xpm|xbm)$, and not defined $link) {
 		print "W: $pkg $type: image-file-in-usr-lib $file\n"
 	    }
 	}
@@ -222,10 +226,19 @@
 	}
 	# ---------------- /usr/share/man and /usr/X11R6/man
 	elsif ($file =~ m,^usr/X11R6/man/\S+, or m,^usr/share/man/\S+, ) {
+	    if ($type eq 'udeb') {
+		print "E: $pkg $type: documentation-file $file\n";
+	    }
 	    if ($perm =~ m/^-.*[xt]/) {
 		print "E: $pkg $type: executable-manpage $file\n";
 	    }
 	}
+	# ---------------- /usr/share/info
+	elsif ($file =~ m,^usr/share/info\S+,) {
+	    if ($type eq 'udeb') {
+		print "E: $pkg $type: documentation-file $file\n";
+	    }
+	}
 	# ---------------- /usr/share
 	elsif ($file =~ m,^usr/share/[^/]+$,) {
 	    if ($perm =~ m/^-/) {
@@ -233,7 +246,7 @@
 	    }
 	}
 	# ---------------- /usr subdirs
-	elsif ($file =~ m,^usr/[^/]+/$, ) { # FSSTND dirs
+	elsif ($type ne 'udeb' and $file =~ m,^usr/[^/]+/$, ) { # FSSTND dirs
 	    if ( $file =~ m,^usr/(dict|doc|etc|info|man|adm|preserve)/,) {
 		print "E: $pkg $type: FSSTND-dir-in-usr $file\n";
 	    }
@@ -251,7 +264,7 @@
 	}
     }
     # ---------------- /var subdirs
-    elsif ($file =~ m,^var/[^/]+/$,) { # FSSTND dirs
+    elsif ($type ne 'udeb' and $file =~ m,^var/[^/]+/$,) { # FSSTND dirs
 	if ( $file =~ m,^var/(adm|catman|named|nis|preserve)/, ) {
 	    print "W: $pkg $type: FSSTND-dir-in-var $file\n";
 	}
@@ -260,7 +273,7 @@
 	    print "E: $pkg $type: non-standard-dir-in-var $file\n";
 	}
     }
-    elsif ($file =~ m,^var/lib/games/.,) {
+    elsif ($type ne 'udeb' and $file =~ m,^var/lib/games/.,) {
 	print "E: $pkg $type: non-standard-dir-in-var $file\n";
     }
     # ---------------- /opt
@@ -293,7 +306,9 @@
 	# base system.  (Specifically, /cdrom, /floppy, /initrd, and /proc
 	# are not mentioned in the FHS).
 	print "E: $pkg $type: non-standard-toplevel-dir $file\n"
-	    unless $pkg eq 'base-files' or $pkg eq 'hurd';
+	    unless $pkg eq 'base-files' 
+	    or $pkg eq 'hurd' 
+	    or $pkg =~ /^rootskel(-bootfloppy)?/;
     }
 
     # ---------------- compatibility symlinks should not be used
@@ -305,7 +320,8 @@
 
     # ---------------- any files
     if ($perm !~ m/^d/) {
-	unless ($file =~ m,^usr/(bin|dict|doc|games|include|info|lib|man|sbin|share|src|X11R6)/, or
+	unless ($type eq 'udeb' or
+		$file =~ m,^usr/(bin|dict|doc|games|include|info|lib|man|sbin|share|src|X11R6)/, or
 		$file =~ m,^lib/(modules/|libc5-compat/)?, or
 		$file =~ m,^var/(games|lib|www|named)/, or
 		$file =~ m,^(bin|boot|dev|etc|sbin)/, or
@@ -502,7 +518,7 @@
 	    $mylink =~ m,^/([^/]*),;
 	    my $linktop = $1;
 
-	    if ($filetop eq $linktop) {
+	    if ($type ne 'udeb' and $filetop eq $linktop) {
 		# absolute links within one toplevel directory are _not_ ok!
 		print "E: $pkg $type: symlink-should-be-relative $file $link\n";
 	    }
@@ -554,7 +570,9 @@
 
 	    if ($#filecomponents == -1) {
 		# we've reached the root directory
-		if (!defined $linkcomponent || $filetop ne $linkcomponent) {
+		if (($type ne 'udeb') 
+		    && (!defined $linkcomponent)
+		    || ($filetop ne $linkcomponent)) {
 		    # relative link into other toplevel directory.
 		    # this hits a relative symbolic link in the root too.
 		    print "E: $pkg $type: symlink-should-be-absolute $file $link\n";

Modified: trunk/checks/files.desc
===================================================================
--- trunk/checks/files.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/files.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,7 +2,7 @@
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: fil
 Standards-Version: 3.5.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 Needs-Info: objdump-info
 Info: This script checks if a binary package conforms to policy
@@ -210,6 +210,14 @@
  absolute.
 Ref: policy 10.5
 
+Tag: documentation-file
+Type: error
+Info: udeb packages should not contain any documentation.
+ .
+ If this is an exception, please contact &maint;
+ about this so that this exception would be recognized in future versions of
+ Lintian.
+
 Tag: executable-in-usr-share-doc
 Type: error
 Info: Usually, documentation files in <tt>/usr/share/doc</tt> should have mode

Modified: trunk/checks/shared-libs
===================================================================
--- trunk/checks/shared-libs	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/shared-libs	2004-03-27 20:48:18 UTC (rev 113)
@@ -216,10 +216,12 @@
 } else {
     # shared libraries included, thus shlibs control file has to exist
     if (not -f $shlibs_control_file) {
-	for my $shlib (@shlibs) {
-	    # skip it if it's not a public shared library
-	    next unless defined $ldso_dir{dirname($shlib)};
-	    print "E: $pkg $type: no-shlibs-control-file $shlib\n";
+	if ($type ne 'udeb') {
+	    for my $shlib (@shlibs) {
+		# skip it if it's not a public shared library
+		next unless defined $ldso_dir{dirname($shlib)};
+		print "E: $pkg $type: no-shlibs-control-file $shlib\n";
+	    }
 	}
     } else {
 	my %shlibs_control_used;

Modified: trunk/checks/shared-libs.desc
===================================================================
--- trunk/checks/shared-libs.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/shared-libs.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,7 +2,7 @@
 Author: Christian Schwarz <schwarz@debian.org>
 Abbrev: shl
 Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 Needs-Info: file-info, objdump-info
 Info: This script checks if a binary package conforms to shared library policy.

Modified: trunk/checks/spelling.desc
===================================================================
--- trunk/checks/spelling.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/checks/spelling.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,7 +2,7 @@
 Author: Richard Braakman <dark@xs4all.nl>
 Abbrev: spl
 Standards-Version: 3.2.0
-Type: binary
+Type: binary, udeb
 Unpack-Level: 1
 Info: This script looks for common spelling errors.
 Needs-Info: copyright-file, debian-readme

Modified: trunk/collection/file-info.desc
===================================================================
--- trunk/collection/file-info.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/collection/file-info.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -1,7 +1,7 @@
 Collector-Script: file-info
 Author: Richard Braakman <dark@xs4all.nl>
 Info: This script runs the `file' command over all files of a binary package.
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Output: file-info
 Order: 1

Modified: trunk/collection/md5sums.desc
===================================================================
--- trunk/collection/md5sums.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/collection/md5sums.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -1,7 +1,7 @@
 Collector-Script: md5sums
 Author: Richard Braakman <dark@xs4all.nl>
 Info: This script runs the `md5sums' over all files in a binary package.
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Output: md5sums
 Order: 1

Modified: trunk/collection/objdump-info.desc
===================================================================
--- trunk/collection/objdump-info.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/collection/objdump-info.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -1,7 +1,7 @@
 Collector-Script: objdump-info
 Author: Christian Schwarz <schwarz@debian.org>
 Info: This script runs `objdump' over all binaries and object files of a binary package.
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Output: objdump-info
 Order: 2

Modified: trunk/collection/override-file.desc
===================================================================
--- trunk/collection/override-file.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/collection/override-file.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -1,7 +1,7 @@
 Collector-Script: override-file
 Author: Darren Benham <gecko@debian.org>
 Info: This script copies the `override' file of a package into the lintian directory.
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Output: override
 Order: 1

Modified: trunk/collection/scripts.desc
===================================================================
--- trunk/collection/scripts.desc	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/collection/scripts.desc	2004-03-27 20:48:18 UTC (rev 113)
@@ -5,7 +5,7 @@
   The format is: scriptpath filename
  Note that the filename might contain spaces, but the scriptpath will not,
  because linux only looks at the first word when executing a script.
-Type: binary
+Type: binary, udeb
 Unpack-Level: 2
 Output: scripts
 Order: 1

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/debian/changelog	2004-03-27 20:48:18 UTC (rev 113)
@@ -2,12 +2,16 @@
 
   The ``moving forward'' release
 
+  * [FL] add udeb support (Closes: #216117)
+    Thanks to Joey Hess for his input. Many changes, mostly to
+     + frontend/lintian, checks/debconf and checks/files
+  
   * checks/binaries:
     + [JvW] Ignore static binaries in /usr/lib/debug
   * checks/menu-format:
     + [FL] only issue one warning about needs=dwww, not two
 
- -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl>  Tue, 16 Mar 2004 00:27:29 +0100
+ -- Frank Lichtenheld <djpig@debian.org>  Sat, 27 Mar 2004 20:55:15 +0100
 
 lintian (1.22.12) unstable; urgency=low
 

Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/frontend/lintian	2004-03-27 20:48:18 UTC (rev 113)
@@ -29,9 +29,9 @@
 #  Global Variables
 #######################################
 my $lintian_info_cmd = 'lintian-info'; #Command to run for ?
-my $LINTIAN_VERSION = "1.22.12";	#External Version number
+my $LINTIAN_VERSION = "1.23.0 UNRELEASED";	#External Version number
 my $BANNER = "Lintian v$LINTIAN_VERSION"; #Version Banner - text form
-my $LAB_FORMAT = 6;		#Lab format Version Number
+my $LAB_FORMAT = 7;		#Lab format Version Number
 				#increased whenever incompatible
 				#changes are done to the lab
 				#so that all packages are re-unpacked
@@ -155,6 +155,7 @@
     -a, --all                 process all packages in distribution
     -b, --binary              process only binary packages
     -s, --source              process only source packages
+    --udeb                    process only udeb packages
     -p X, --packages-file X   process all files in file (special syntax!)
 EOT-EOT-EOT
 
@@ -203,10 +204,11 @@
 }
 
 # Record what type of data is specified
-# Options: -b|--binary, -s|--source
+# Options: -b|--binary, -s|--source, --udeb
 sub record_pkgmode {
     $pkg_mode = 'b' if $_[0] eq 'binary';
     $pkg_mode = 's' if $_[0] eq 'source';
+    $pkg_mode = 'u' if $_[0] eq 'udeb';
 }
 
 # Hash used to process commandline options
@@ -249,6 +251,7 @@
 	       "all|a" => \$check_everything,
 	       "binary|b" => \&record_pkgmode,
 	       "source|s" => \&record_pkgmode,
+	       "udeb" => \&record_pkgmode,
 	       "packages-file|p=s" => \$packages_file,
 	      );
 
@@ -428,7 +431,7 @@
 require Util;
 require Pipeline;
 require Read_pkglists;
-use vars qw(%source_info %binary_info); # from the above
+use vars qw(%source_info %binary_info %udeb_info); # from the above
 
 # determine requested unpack level
 if (defined($unpack_level)) {
@@ -478,6 +481,7 @@
 
     # LINTIAN_LAB has to exist in this mode
     unless (-d "$LINTIAN_LAB/binary" &&
+	    -d "$LINTIAN_LAB/udeb" &&
 	    -d "$LINTIAN_LAB/source" &&
 	    -d "$LINTIAN_LAB/info") {
 	fail("lintian lab has not been set up correctly (run lintian --setup-lab)");
@@ -552,6 +556,15 @@
 	    }
 	    schedule_package('b', $info->{'package'}, $info->{'version'}, $arg);
 	}
+	# .udeb file?
+	if ($arg =~ /\.udeb$/) {
+	    my $info = get_deb_info($arg);
+	    if (not defined $info) {
+		print STDERR "$arg is a zero-byte file, skipping\n";
+		next;
+	    }
+	    schedule_package('u', $info->{'package'}, $info->{'version'}, $arg);
+	}
 	# .dsc file?
 	elsif ($arg =~ /\.dsc$/) {
 	    my $info = get_dsc_info($arg);
@@ -634,10 +647,14 @@
 		    my $info = get_deb_info($filename);
 		    schedule_package('b', $info->{'package'},
 				     $info->{'version'}, $filename);
+		} elsif ($file =~ /\.udeb$/) {
+		    my $info = get_deb_info($filename);
+		    schedule_package('u', $info->{'package'},
+				     $info->{'version'}, $filename);
 		}
 	    }
 	} else {
-	    fail("bad package file name $arg (neither .deb or .dsc file)");
+	    fail("bad package file name $arg (neither .deb, .udeb or .dsc file)");
 	}
     } else {
 	# parameter is a package name--so look it up
@@ -657,6 +674,7 @@
 	    # read package info
 	    read_src_list("$LINTIAN_LAB/info/source-packages", 0);
 	    read_bin_list("$LINTIAN_LAB/info/binary-packages", 0);
+	    read_udeb_list("$LINTIAN_LAB/info/udeb-packages", 0);
 
 	    if (($pkg_mode eq 'b') or ($pkg_mode eq 'a')) {
 		if ($binary_info{$arg}) {
@@ -666,6 +684,14 @@
 		    $found = 1;
 		}
 	    }
+	    if (($pkg_mode eq 'u') or ($pkg_mode eq 'a')) {
+		if ($udeb_info{$arg}) {
+		    schedule_package('u', $udeb_info{$arg}->{'package'},
+				     $udeb_info{$arg}->{'version'},
+				     "$LINTIAN_ARCHIVEDIR/$udeb_info{$arg}->{'file'}");
+		    $found = 1;
+		}
+	    }
 	    if (($pkg_mode eq 's') or ($pkg_mode eq 'a')) {
 		if ($source_info{$arg}) {
 		    schedule_package('s', $source_info{$arg}->{'source'},
@@ -682,6 +708,7 @@
 
 	my $b = "$LINTIAN_LAB/binary/$arg";
 	my $s = "$LINTIAN_LAB/source/$arg";
+	my $u = "$LINTIAN_LAB/udeb/$arg";
 
 	if ($pkg_mode eq 'b') {
 	    unless (-d $b) {
@@ -695,10 +722,16 @@
 		$exit_code = 2;
 		next;
 	    }
+	} elsif ($pkg_mode eq 'u') {
+	    unless (-d $u) {
+		warn "error: cannot find udeb package $arg in $search (skipping)\n";
+		$exit_code = 2;
+		next;
+	    }
 	} else {
 	    # $pkg_mode eq 'a'
-	    unless (-d $b or -d $s) {
-		warn "error: cannot find binary or source package $arg in $search (skipping)\n";
+	    unless (-d $b or -d $s or -d $u) {
+		warn "error: cannot find binary, udeb or source package $arg in $search (skipping)\n";
 		$exit_code = 2;
 		next;
 	    }
@@ -710,6 +743,9 @@
 	if (($pkg_mode eq 's') or (($pkg_mode eq 'a') and (-d $s))) {
 	    schedule_package('s', get_src_info_from_lab($s));
 	}
+	if (($pkg_mode eq 'u') or (($pkg_mode eq 'a') and (-d $u))) {
+	    schedule_package('u', get_bin_info_from_lab($u));
+	}
     }
 }
 
@@ -753,25 +789,19 @@
 
     set_value($f, $p,'type',$secs[0],1);
     # convert Type:
-    my ($b,$s);
+    my ($b,$s,$u) = ( "", "", "" );;
     for (split(/\s*,\s*/o,$p->{'type'})) {
 	if ($_ eq 'binary') {
-	    $b = 1;
+	    $b = 'b';
 	} elsif ($_ eq 'source') {
-	    $s = 1;
+	    $s = 's';
+	} elsif ($_ eq 'udeb') {
+	    $u = 'u';
 	} else {
 	    fail("unknown type $_ specified in description file $f");
 	}
     }
-    if ($b and $s) {
-	$p->{'type'} = 'a';
-    } elsif ($b) {
-	$p->{'type'} = 'b';
-    } elsif ($s) {
-	$p->{'type'} = 's';
-    } else {
-	$p->{'type'} = '';
-    }
+    $p->{'type'} = "$s$b$u";
 
     set_value($f,$p,'unpack-level',$secs[0],1);
     set_value($f,$p,'output',$secs[0],1);
@@ -825,25 +855,19 @@
 
     set_value($f,$p,'type',$secs[0],1);
     # convert Type:
-    my ($b,$s);
+    my ($b,$s,$u) = ( "", "", "" );
     for (split(/\s*,\s*/o,$p->{'type'})) {
 	if ($_ eq 'binary') {
-	    $b = 1;
+	    $b = 'b';
 	} elsif ($_ eq 'source') {
-	    $s = 1;
+	    $s = 's';
+	} elsif ($_ eq 'udeb') {
+	    $u = 'u';
 	} else {
 	    fail("unknown type $_ specified in description file $f");
 	}
     }
-    if ($b and $s) {
-	$p->{'type'} = 'a';
-    } elsif ($b) {
-	$p->{'type'} = 'b';
-    } elsif ($s) {
-	$p->{'type'} = 's';
-    } else {
-	$p->{'type'} = '';
-    }
+    $p->{'type'} = "$s$b$u";
 
     set_value($f,$p,'unpack-level',$secs[0],1);
     set_value($f,$p,'abbrev',$secs[0],1);
@@ -942,6 +966,7 @@
     # make sure package info is available
     read_src_list("$LINTIAN_LAB/info/source-packages", 0);
     read_bin_list("$LINTIAN_LAB/info/binary-packages", 0);
+    read_udeb_list("$LINTIAN_LAB/info/udeb-packages", 0);
 
     if ($debug >= 2) {
       print STDERR "pkg_mode = $pkg_mode\n";
@@ -962,6 +987,12 @@
 	    push(@packages,"b $binary_info{$arg}->{'package'} $binary_info{$arg}->{'version'} $LINTIAN_ARCHIVEDIR/$binary_info{$arg}->{'file'}");
 	}
     }
+    if (($pkg_mode eq 'a') or ($pkg_mode eq 'u')) {
+	for my $arg (keys %udeb_info) {
+	    print STDERR "doing stuff with $LINTIAN_ARCHIVEDIR/$udeb_info{$arg}->{'file'}\n" if $debug;
+	    push(@packages,"u $udeb_info{$arg}->{'package'} $udeb_info{$arg}->{'version'} $LINTIAN_ARCHIVEDIR/$udeb_info{$arg}->{'file'}");
+	}
+    }
 
     # package list still empty?
     if ($#packages == -1) {
@@ -999,9 +1030,9 @@
 # can use information from the source packages if these are unpacked)
 PACKAGE:
 for (reverse sort @packages) {
-    m/^([bs]) (\S+) (\S+) (.+)$/ or fail("internal error: syntax error in \@packages array: $_");
+    m/^([bsu]) (\S+) (\S+) (.+)$/ or fail("internal error: syntax error in \@packages array: $_");
     my ($type,$pkg,$ver,$file) = ($1,$2,$3,$4);
-    my $long_type = ($type eq 'b' ? 'binary' : 'source');
+    my $long_type = ($type eq 'b' ? 'binary' : ($type eq 's' ? 'source' : 'udeb' ));
 
     print "N: ----\n" if $verbose;
     if ($verbose) {
@@ -1102,7 +1133,7 @@
 	    my $ci = $collection_info{$coll};
 
 	    # current type?
-	    next unless ($ci->{'type'} eq $type) or ($ci->{'type'} eq 'a');
+	    next unless ($ci->{'type'} =~ m/$type/);
 
 	    # info already available?
 	    next if (-e "$base/$ci->{'output'}");
@@ -1165,7 +1196,7 @@
 	    my $ci = $check_info{$check};
 
 	    # current type?
-	    next unless ($ci->{'type'} eq $type) or ($ci->{'type'} eq 'a');
+	    next unless ($ci->{'type'} =~ m/$type/);
 
 	    # unpack to desired unpack level (if necessary)
 	    $act_unpack_level = unpack_pkg($type,$base,$file,$act_unpack_level,$ci->{'unpack-level'});
@@ -1356,13 +1387,16 @@
     if (not -d "$LINTIAN_LAB/source") {
 	mkdir("$LINTIAN_LAB/source",0777) or fail("cannot create lab directory $LINTIAN_LAB/source");
     }
+    if (not -d "$LINTIAN_LAB/udeb") {
+	mkdir("$LINTIAN_LAB/udeb",0777) or fail("cannot create lab directory $LINTIAN_LAB/udeb");
+    }
     if (not -d "$LINTIAN_LAB/info") {
 	mkdir("$LINTIAN_LAB/info",0777) or fail("cannot create lab directory $LINTIAN_LAB/info");
     }
 
     # distribution specified?
     if ($LINTIAN_DIST) {
-	print STDERR "spawning list-binpkg and list-srcpkg since LINTIAN_DIST=$LINTIAN_DIST\n" if ($debug >= 2);
+	print STDERR "spawning list-binpkg, list-udebpkg and list-srcpkg since LINTIAN_DIST=$LINTIAN_DIST\n" if ($debug >= 2);
 	# yes!
 
 	my $v = $verbose ? '-v' : '';
@@ -1373,13 +1407,18 @@
 	spawn("$LINTIAN_ROOT/unpack/list-srcpkg",
 	      "$LINTIAN_LAB/info/source-packages", $v) == 0
 		  or fail("cannot create source package list");
+	spawn("$LINTIAN_ROOT/unpack/list-udebpkg",
+	      "$LINTIAN_LAB/info/udeb-packages", $v) == 0
+		  or fail("cannot create udeb package list");
     } else {
-	print STDERR "not spawning list-binpkg and list-srcpkg since LINTIAN_DIST is empty\n" if ($debug >= 2);
+	print STDERR "not spawning list-binpkg, list-udebpkg and list-srcpkg since LINTIAN_DIST is empty\n" if ($debug >= 2);
 	# just create empty files
 	touch("$LINTIAN_LAB/info/binary-packages")
 	    or fail("cannot create binary package list");
 	touch("$LINTIAN_LAB/info/source-packages")
 	    or fail("cannot create source package list");
+	touch("$LINTIAN_LAB/info/udeb-packages")
+	    or fail("cannot create udeb package list");
     }
 }
 
@@ -1421,6 +1460,7 @@
     if (spawn('rm', '-rf', '--',
 	      "$LINTIAN_LAB/binary",
 	      "$LINTIAN_LAB/source",
+	      "$LINTIAN_LAB/udeb",
 	      "$LINTIAN_LAB/info") != 0) {
 	print STDERR "warning: cannot remove lab directory $LINTIAN_LAB (please remove it yourself)\n";
     }
@@ -1454,7 +1494,7 @@
 	 (not defined ($cur_level) or ($cur_level < 1)) ) {
 	# create new directory
 	print "N: Unpacking package to level 1 ...\n" if $debug;
-	if ($type eq 'b') {
+	if (($type eq 'b') || ($type eq 'u')) {
 	    spawn("$LINTIAN_ROOT/unpack/unpack-binpkg-l1", $base, $file) == 0
 		or return -1;
 	} else {
@@ -1468,7 +1508,7 @@
 	 (not defined ($cur_level) or ($cur_level < 2)) ) {
 	# unpack package contents
 	print "N: Unpacking package to level 2 ...\n" if $debug;
-	if ($type eq 'b') {
+	if (($type eq 'b') || ($type eq 'u')) {
 	    spawn("$LINTIAN_ROOT/unpack/unpack-binpkg-l2", $base) == 0
 		or return -1;
 	} else {
@@ -1589,7 +1629,7 @@
     if ( $already_scheduled{$s}++ ) {
 	if ($verbose) {
 	    printf "N: Ignoring duplicate %s package $pkg (version $ver)\n",
-		$type eq 'b' ? 'binary' : 'source';
+		$type eq 'b' ? 'binary' : ($type eq 's' ? 'source': 'udeb');
 	}
 	return;
     }

Modified: trunk/lib/Read_pkglists.pm
===================================================================
--- trunk/lib/Read_pkglists.pm	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/lib/Read_pkglists.pm	2004-03-27 20:48:18 UTC (rev 113)
@@ -20,15 +20,17 @@
 # MA 02111-1307, USA.
 
 use strict;
-use vars qw($BINLIST_FORMAT $SRCLIST_FORMAT %source_info %binary_info %bin_src_ref);
+use vars qw($BINLIST_FORMAT $SRCLIST_FORMAT $UDEBLIST_FORMAT %source_info %binary_info %udeb_info %bin_src_ref);
 
 # these banner lines have to be changed with every incompatible change of the
 # binary and source list file formats
 $BINLIST_FORMAT = "Lintian's list of binary packages in the archive--V2";
 $SRCLIST_FORMAT = "Lintian's list of source packages in the archive--V2";
+$UDEBLIST_FORMAT = "Lintian's list of udeb packages in the archive--V1";
 
 %source_info = ();
 %binary_info = ();
+%udeb_info = ();
 %bin_src_ref = ();
 
 sub read_src_list {
@@ -126,6 +128,54 @@
   close(IN);
 }
 
+sub read_udeb_list {
+  my ($udeb_list,$quiet) = @_;
+  my $LINTIAN_LAB = $ENV{'LINTIAN_LAB'};
+
+  if (%udeb_info) {
+    warn "\%udeb_info exists, nothing to do in read_bin_list\n" unless $quiet;
+    return;
+  }
+
+  $udeb_list or ($udeb_list = "$LINTIAN_LAB/info/udeb-packages");
+  return unless -s $udeb_list;
+
+  open(IN,$udeb_list) or fail("cannot open udeb list file $udeb_list: $!");
+
+  # compatible file format?
+  my $f;
+  chop($f = <IN>);
+  if ($f ne $UDEBLIST_FORMAT) {
+    close(IN);
+    return 0 if $quiet;
+    fail("the udeb list file $udeb_list has an incompatible file format (run lintian --setup-lab)");
+  }
+
+  # compatible format, so read file
+  while (<IN>) {
+    chop;
+
+    next if /^\s*$/o;
+    my ($udeb,$ver,$source,$file,$timestamp) = split(/\;/o,$_);
+
+    my $udeb_struct;
+    %$udeb_struct =
+      (
+       'package' => $udeb,
+       'version' => $ver,
+       'source' => $source,
+       'file' => $file,
+       'timestamp' => $timestamp,
+       );
+
+    $udeb_info{$udeb} = $udeb_struct;
+  }
+
+  close(IN);
+}
+
+
+
 sub get_bin_src_ref {
   read_src_list();
   for my $source (keys %source_info) {

Modified: trunk/man/lintian.1
===================================================================
--- trunk/man/lintian.1	2004-03-24 22:04:51 UTC (rev 112)
+++ trunk/man/lintian.1	2004-03-27 20:48:18 UTC (rev 113)
@@ -252,6 +252,10 @@
 The following packages listed on the command line are source packages.
 
 .TP
+.BR \-\-udeb
+The following packages listed on the command line are udeb packages.
+
+.TP
 .BR \-p ", " \-\-packages\-file " X"
 Process all packages which are listed in file
 .BR X .

Copied: trunk/unpack/list-udebpkg (from rev 112, branches/1.22.11+udeb/unpack/list-udebpkg)


Property changes on: trunk/unpack/list-udebpkg
___________________________________________________________________
Name: svn:executable
   + *



Reply to: