Bug#582767: lintian: if Package format 3.0 is in use report warning for quilt in Depebds:
tags 582767 + patch
thanks
Hi
I have created a patch that implements this check with a small test case for it.
~Niels
From 0bd1d202b0f46598eff33cd8d522161c1e5f37ff Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Tue, 7 Dec 2010 23:48:52 +0100
Subject: [PATCH] Added check for unneeded build-dep on quilt when building a 3.0 (quilt) package,
including a test case for it.
---
checks/patch-systems | 3 +++
checks/patch-systems.desc | 8 ++++++++
.../debian/debian/README.source | 1 +
.../debian/debian/control.in | 15 +++++++++++++++
.../debian/debian/source/format | 1 +
t/tests/patch-systems-quilt-source/desc | 7 +++++++
t/tests/patch-systems-quilt-source/tags | 1 +
t/tests/patch-systems-quilt-source/upstream/README | 1 +
8 files changed, 37 insertions(+), 0 deletions(-)
create mode 100644 t/tests/patch-systems-quilt-source/debian/debian/README.source
create mode 100644 t/tests/patch-systems-quilt-source/debian/debian/control.in
create mode 100644 t/tests/patch-systems-quilt-source/debian/debian/source/format
create mode 100644 t/tests/patch-systems-quilt-source/desc
create mode 100644 t/tests/patch-systems-quilt-source/tags
create mode 100644 t/tests/patch-systems-quilt-source/upstream/README
diff --git a/checks/patch-systems b/checks/patch-systems
index 9934d46..73337e9 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -118,6 +118,9 @@ sub run {
#----- quilt
if ($build_deps->implies("quilt") or $quilt_format) {
$uses_patch_system++;
+ if($quilt_format && $build_deps->implies("quilt")){
+ tag "unneeded-build-dep-on-quilt";
+ }
#check for a debian/patches file:
if (! -r "debfiles/patches/series") {
tag "quilt-build-dep-but-no-series-file" unless $quilt_format;
diff --git a/checks/patch-systems.desc b/checks/patch-systems.desc
index d77749b..f04a9bd 100644
--- a/checks/patch-systems.desc
+++ b/checks/patch-systems.desc
@@ -160,3 +160,11 @@ Info: This package build-depends on a patch system such as dpatch or
referring to <tt>/usr/share/doc/quilt/README.source</tt>. Similarly, you
can refer to <tt>/usr/share/doc/dpatch/README.source.gz</tt> for dpatch.
Ref: policy 4.14
+
+Tag: unneeded-build-dep-on-quilt
+Severity: normal
+Certainty: certain
+Info: This package build-depends on quilt, which is not required since
+ dpkg-source will apply patches at unpack time for 3.0 (quilt) source
+ packages.
+
diff --git a/t/tests/patch-systems-quilt-source/debian/debian/README.source b/t/tests/patch-systems-quilt-source/debian/debian/README.source
new file mode 100644
index 0000000..17250a4
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/debian/debian/README.source
@@ -0,0 +1 @@
+This package uses quilt. See /usr/share/doc/quilt/README.source.
diff --git a/t/tests/patch-systems-quilt-source/debian/debian/control.in b/t/tests/patch-systems-quilt-source/debian/debian/control.in
new file mode 100644
index 0000000..5f56ffb
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/debian/debian/control.in
@@ -0,0 +1,15 @@
+Source: {$srcpkg}
+Priority: extra
+Section: devel
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: quilt, debhelper (>= 7)
+
+Package: {$srcpkg}
+Architecture: {$architecture}
+Depends: $\{shlib:Depends\}, $\{misc:Depends\}
+Description: {$description}
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
diff --git a/t/tests/patch-systems-quilt-source/debian/debian/source/format b/t/tests/patch-systems-quilt-source/debian/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/debian/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/t/tests/patch-systems-quilt-source/desc b/t/tests/patch-systems-quilt-source/desc
new file mode 100644
index 0000000..d9f6dd1
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/desc
@@ -0,0 +1,7 @@
+Testname: patch-systems-quilt-source
+Sequence: 6000
+Type: non-native
+Version: 1.0-1
+Description: Test for quilt patches which do not have accompanying descriptions
+Test-For: unneeded-build-dep-on-quilt
+References: Debian Bug #582767
diff --git a/t/tests/patch-systems-quilt-source/tags b/t/tests/patch-systems-quilt-source/tags
new file mode 100644
index 0000000..856b0e2
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/tags
@@ -0,0 +1 @@
+W: patch-systems-quilt-source source: unneeded-build-dep-on-quilt
diff --git a/t/tests/patch-systems-quilt-source/upstream/README b/t/tests/patch-systems-quilt-source/upstream/README
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/t/tests/patch-systems-quilt-source/upstream/README
@@ -0,0 +1 @@
+README
--
1.7.2.3
Reply to: