lintian: r1158 - in trunk: checks debian testset
Author: rra
Date: 2008-02-03 22:22:35 +0100 (Sun, 03 Feb 2008)
New Revision: 1158
Modified:
trunk/checks/fields
trunk/checks/fields.desc
trunk/debian/changelog
trunk/testset/tags.cdbs-test
trunk/testset/tags.debconf
Log:
* checks/fields{.desc,}:
+ [RA] Versioned Python dependencies satisfy a Python debian/rules
requirement. Add a separate tag for Python build dependencies to
explain the dependency possibilities. Ignore dh_python if
debian/pyversion or a Python-Version control field are present.
Thanks, Lo?\195?\175c Minier. (Closes: #460625)
Modified: trunk/checks/fields
===================================================================
--- trunk/checks/fields 2008-02-03 20:33:59 UTC (rev 1157)
+++ trunk/checks/fields 2008-02-03 21:22:35 UTC (rev 1158)
@@ -33,7 +33,8 @@
# The allowed Python dependencies currently. This is the list of alternatives
# that, either directly or through transitive dependencies that can be relied
# upon, ensure /usr/bin/python will exist for the use of dh_python.
-my $python_depend = 'python | python-dev | python-all | python-all-dev';
+my $python_depend = 'python | python-dev | python-all | python-all-dev'
+ . join (' | ', map { "python$_ | python$_-dev" } qw(2.4 2.5));
# Certain build tools must be listed in Build-Depends even if there are no
# arch-specific packages because they're required in order to run the clean
@@ -51,7 +52,7 @@
[ quilt => '^include\s+/usr/share/cdbs/1/rules/patchsys-quilt.mk' ],
[ dpatch => '^include\s+/usr/share/dpatch/' ],
[ quilt => '^include\s+/usr/share/quilt/' ],
- [ $python_depend => '/usr/share/cdbs/1/class/python-distutils.mk' ],
+ [ $python_depend => '/usr/share/cdbs/1/class/python-distutils.mk', 'missing-python-build-dependency' ],
);
# These are similar, but the resulting dependency is only allowed, not
@@ -88,8 +89,8 @@
[ dpatch => '^\t\s*dpatch\s' ],
[ 'libmodule-build-perl' => '(^\t|\|\|)\s*(perl|\$\(PERL\))\s+Build\b' ],
[ "po-debconf" => '^\t\s*debconf-updatepo\s' ],
- [ $python_depend => '^\t\s*python\s' ],
- [ $python_depend => '\ssetup\.py\b' ],
+ [ $python_depend => '^\t\s*python\s', 'missing-python-build-dependency' ],
+ [ $python_depend => '\ssetup\.py\b', 'missing-python-build-dependency' ],
[ quilt => '^\t\s*(\S+=\S+\s+)*quilt\s' ],
[ yada => '^\t\s*yada\s' ],
);
@@ -731,16 +732,31 @@
if (Dep::implies($depend{'build-depends-indep'}, $dep)) {
tag "clean-should-be-satisfied-by-build-depends", $package;
} else {
- tag $tag, $package if $package ne 'debhelper';
+ if ($tag eq 'missing-build-dependency') {
+ tag $tag, $package if $package ne 'debhelper';
+ } else {
+ tag $tag;
+ }
}
}
}
for my $package (keys %needed) {
my $dep = Dep::parse($package);
my $tag = $needed{$package} || 'missing-build-dependency';
+
+ # dh_python deactivates itself if the new Python build policy
+ # is enabled.
+ if ($tag eq 'missing-dh_python-build-dependency') {
+ next if -f 'debfiles/pycomat';
+ next if -f 'fields/python-version';
+ }
unless (Dep::implies($depend{'build-depends'}, $dep)) {
unless (Dep::implies($depend{'build-depends-indep'}, $dep)) {
- tag $tag, $package;
+ if ($tag eq 'missing-build-dependency') {
+ tag $tag, $package;
+ } else {
+ tag $tag;
+ }
}
}
}
Modified: trunk/checks/fields.desc
===================================================================
--- trunk/checks/fields.desc 2008-02-03 20:33:59 UTC (rev 1157)
+++ trunk/checks/fields.desc 2008-02-03 21:22:35 UTC (rev 1158)
@@ -516,6 +516,20 @@
dependencies on every non-essential, non-build-essential package that is
used directly during the build.
+Tag: missing-python-build-dependency
+Type: error
+Ref: policy 4.2
+Info: The package appears to use Python as part of its build process in
+ <tt>debian/rules</tt> but doesn't depend on Python.
+ .
+ Normally, packages that use Python as part of the build process should
+ build-depend on one of python, python-all, python-dev, or python-all-dev
+ depending on whether they support multiple versions of Python and whether
+ they're building modules or only using Python as part of the package
+ build process. Packages that depend on a specific version of Python may
+ build-depend on the appropriate pythonX.Y or pythonX.Y-dev package
+ instead.
+
Tag: missing-dh_python-build-dependency
Type: error
Ref: dh_python(1)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-02-03 20:33:59 UTC (rev 1157)
+++ trunk/debian/changelog 2008-02-03 21:22:35 UTC (rev 1158)
@@ -12,9 +12,14 @@
+ [FL] Update list of debhelper commands that modify maintainer
scripts. Add dh_icons, dh_installudev, dh_pysupport, dh_pycentral
and rename dh_installtexfonts to dh_installtex.
- * checks/fields:
+ * checks/fields{.desc,}:
+ [RA] The CDBS ant rules are in class, not rules. Thanks, Cyril
Brulebois. (Closes: #460168)
+ + [RA] Versioned Python dependencies satisfy a Python debian/rules
+ requirement. Add a separate tag for Python build dependencies to
+ explain the dependency possibilities. Ignore dh_python if
+ debian/pyversion or a Python-Version control field are present.
+ Thanks, Loïc Minier. (Closes: #460625)
* checks/files.desc:
+ [RA] In many of the long descriptions for symlink-related tags,
mention that running dh_link will fix symlink problems.
Modified: trunk/testset/tags.cdbs-test
===================================================================
--- trunk/testset/tags.cdbs-test 2008-02-03 20:33:59 UTC (rev 1157)
+++ trunk/testset/tags.cdbs-test 2008-02-03 21:22:35 UTC (rev 1158)
@@ -1,5 +1,5 @@
E: cdbs-test source: clean-should-be-satisfied-by-build-depends debhelper
-E: cdbs-test source: missing-build-dependency python | python-dev | python-all | python-all-dev
+E: cdbs-test source: missing-python-build-dependency
I: cdbs-test source: build-depends-without-arch-dep yada
I: cdbs-test source: package-lacks-versioned-build-depends-on-debhelper 5
W: cdbs-test source: native-package-with-dash-version
Modified: trunk/testset/tags.debconf
===================================================================
--- trunk/testset/tags.debconf 2008-02-03 20:33:59 UTC (rev 1157)
+++ trunk/testset/tags.debconf 2008-02-03 21:22:35 UTC (rev 1158)
@@ -1,5 +1,5 @@
E: debconf source: declares-possibly-conflicting-debhelper-compat-versions rules=4 compat=4
-E: debconf source: missing-dh_python-build-dependency python | python-dev | python-all | python-all-dev
+E: debconf source: missing-dh_python-build-dependency
E: debconf-test: extended-description-is-empty
E: debconf-test: mismatch-translated-choices debconf/testmulti-escape choices-de.utf-8
E: debconf-test: no-template-description debconf/no-description
Reply to: