Package: lintian
Version: 1.23.14
Tags: patch
This patch adds a check for depends or build-depends on
x-window-system{,-dev}; as discussed on debian-x, these are metapackages
for user convenience, not for use in package dependencies.
This patch also adds xlibs-dev to the list of obsolete packages, and
checks for obsolete packages in build-depends as well as depends.
These changes will help with the current xlibs-dev transition.
- Josh Triplett
diff -Naur lintian-1.23.14.orig/checks/common_data.pm lintian-1.23.14/checks/common_data.pm
--- lintian-1.23.14.orig/checks/common_data.pm 2005-12-17 09:31:16.000000000 -0800
+++ lintian-1.23.14/checks/common_data.pm 2006-01-08 20:00:44.000000000 -0800
@@ -7,7 +7,7 @@
%known_obsolete_fields %known_essential %known_build_essential
%known_obsolete_packages %known_virtual_packages
%known_libstdcs %known_tcls %known_tclxs %known_tks %known_tkxs
- %known_libpngs %non_standard_archs
+ %known_libpngs %known_x_metapackages %non_standard_archs
);
# simple defines for commonly needed data
@@ -70,7 +70,7 @@
%known_obsolete_packages = map { $_ => 1 }
('libstdc++2.8', 'ncurses3.4', 'slang0.99.38', 'newt0.25', 'mesag2',
'libjpegg6a', 'gmp2', 'libgtop0', 'libghttp0', 'libpgsql', 'tk4.2',
- 'tcl7.6', 'libpng0g', 'xbase');
+ 'tcl7.6', 'libpng0g', 'xbase', 'xlibs-dev');
# Used only (at least lintian 1.23.1) for giving a warning about a
# virtual-only dependency
@@ -119,4 +119,7 @@
%known_libpngs = map { $_ => 1 }
( 'libpng12-0', 'libpng2', 'libpng3', );
+%known_x_metapackages = map { $_ => 1 }
+ ( 'x-window-system', 'x-window-system-dev', );
+
1;
diff -Naur lintian-1.23.14.orig/checks/fields lintian-1.23.14/checks/fields
--- lintian-1.23.14.orig/checks/fields 2005-08-12 16:44:18.000000000 -0700
+++ lintian-1.23.14/checks/fields 2006-01-08 20:10:34.000000000 -0800
@@ -317,6 +317,9 @@
tag "package-depends-on-an-x-font-package", "$field: $part_d_orig"
if ($field =~ /^(pre-)?depends$/ && $d_pkg =~ /^xfont.*/);
+ tag "package-depends-on-an-x-metapackage", "$field: $part_d_orig"
+ if ($field =~ /^(pre-)?depends$/ && defined $known_x_metapackages{$d_pkg});
+
tag "needlessly-depends-on-awk", "$field"
if ($d_pkg eq "awk" && ! $d_version->[0] && &$is_dep_field($field));
@@ -463,6 +466,12 @@
tag "bad-relation", "$field: $part_d_orig"
if $rest;
+
+ tag "build-depends-on-obsolete-package", "$field: $part_d_orig"
+ if ($known_obsolete_packages{$d_pkg} && &$is_dep_field($field));
+
+ tag "package-build-depends-on-an-x-metapackage", "$field: $part_d_orig"
+ if &$is_dep_field($field) && defined $known_x_metapackages{$d_pkg};
}
}
}
diff -Naur lintian-1.23.14.orig/checks/fields.desc lintian-1.23.14/checks/fields.desc
--- lintian-1.23.14.orig/checks/fields.desc 2005-08-12 16:44:18.000000000 -0700
+++ lintian-1.23.14/checks/fields.desc 2006-01-08 20:10:54.000000000 -0800
@@ -350,6 +350,10 @@
Type: error
Info: The package depends on a package that has been superseded.
+Tag: build-depends-on-obsolete-package
+Type: error
+Info: The package build-depends on a package that has been superseded.
+
Tag: depends-on-essential-package-without-using-version
Type: error
Ref: policy 3.5
@@ -407,6 +411,20 @@
relationship may be used.
Ref: policy 11.8.5
+Tag: package-depends-on-an-x-metapackage
+Type: error
+Info: Packages must not depend on X Window System metapackages.
+ .
+ The metapackages x-window-system and x-window-system-dev exist only for the
+ benefit of users, and should not be used in package dependencies.
+
+Tag: package-build-depends-on-an-x-metapackage
+Type: error
+Info: Packages must not build-depend on X Window System metapackages.
+ .
+ The metapackages x-window-system and x-window-system-dev exist only for the
+ benefit of users, and should not be used in package build-dependencies.
+
Tag: build-depends-indep-without-arch-indep
Type: error
Ref: policy 7.6
Attachment:
signature.asc
Description: OpenPGP digital signature