[SCM] Debian package checker branch, master, updated. 2.0.0-39-g9c2a249
The following commit has been merged in the master branch:
commit 9c2a249661ea9da0f8dd1be8757cf0c9b248ef92
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Tue Nov 11 20:13:12 2008 +0000
Add quilt-patch-without-description (Closes: #498892)
checks/patch-systems{,.desc}:
Check whether quilt patches include a description.
Lines starting "Index" or "diff" are assumed not to be part of the
description as are separator lines of = signs.
diff --git a/checks/patch-systems b/checks/patch-systems
index 4be2fe2..a481d32 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -150,6 +150,20 @@ sub run {
tag "quilt-series-references-non-existent-patch", $patch_file;
next;
}
+ if (open(PATCH_FILE, '<', "debfiles/patches/$patch_file")) {
+ my $has_description = 0;
+ while (<PATCH_FILE>) {
+ # stop if something looking like a patch starts:
+ last if /^---/;
+ next if /^\s*$/;
+ # Skip common "lead-in" lines
+ $has_description = 1 unless (/^(Index: |=+$|diff .+)/);
+ }
+ close(PATCH_FILE);
+ unless ($has_description) {
+ tag "quilt-patch-missing-description", $patch_file;
+ }
+ }
check_patch($patch_file);
}
}
diff --git a/checks/patch-systems.desc b/checks/patch-systems.desc
index e054b3c..5d728f1 100644
--- a/checks/patch-systems.desc
+++ b/checks/patch-systems.desc
@@ -71,6 +71,13 @@ Certainty: certain
Info: In the series file listing all your quilt patches, you referenced a
file that does not exist. This will lead to a fatal error when calling quilt.
+Tag: quilt-patch-missing-description
+Severity: minor
+Certainty: certain
+Info: quilt patch files should carry a description of the function of the
+ included patch. Description lines may be included before the start of the
+ patch itself.
+
Tag: patch-modifying-debian-files
Severity: important
Certainty: certain
diff --git a/debian/changelog b/debian/changelog
index 6b82102..5167ea6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ lintian (2.1.0) unstable; urgency=low
when determining whether the patch includes a description.
(Closes: #503695)
+ [ADB] Add missing "diffstat" to the Needs-Info field.
+ + [ADB] Check whether quilt patches include a description.
+ (Closes: #498892)
* check/scripts:
+ [FL] Use $known_shells_regex from common_data.
diff --git a/t/tests/6000_patch-systems-quilt-description.desc b/t/tests/6000_patch-systems-quilt-description.desc
new file mode 100644
index 0000000..ea167b3
--- /dev/null
+++ b/t/tests/6000_patch-systems-quilt-description.desc
@@ -0,0 +1,5 @@
+Testname: patch-systems-quilt-description
+Version: 1.0
+Description: Test for quilt patches which do not have accompanying descriptions
+Test-For: quilt-patch-missing-description
+References: Debian Bug #498892
diff --git a/t/templates/skel/debian/control.in b/t/tests/patch-systems-quilt-description/debian/debian/control.in
similarity index 86%
copy from t/templates/skel/debian/control.in
copy to t/tests/patch-systems-quilt-description/debian/debian/control.in
index bc8f6c0..28af7ad 100644
--- a/t/templates/skel/debian/control.in
+++ b/t/tests/patch-systems-quilt-description/debian/debian/control.in
@@ -3,7 +3,7 @@ Priority: extra
Section: devel
Maintainer: {$author}
Standards-Version: 3.8.0
-Build-Depends: debhelper (>= 7)
+Build-Depends: quilt, debhelper (>= 7)
Package: {$srcpkg}
Architecture: {$architecture}
@@ -11,3 +11,4 @@ Depends: $\{shlib:Depends\}, $\{misc:Depends\}
Description: {$description}
.
Part of the lintian test suite.
+
diff --git a/t/tests/patch-systems-quilt-description/debian/debian/patches/01_this_patch_is_ok b/t/tests/patch-systems-quilt-description/debian/debian/patches/01_this_patch_is_ok
new file mode 100644
index 0000000..7eee707
--- /dev/null
+++ b/t/tests/patch-systems-quilt-description/debian/debian/patches/01_this_patch_is_ok
@@ -0,0 +1,7 @@
+This is a description of the patch
+
+--- a.orig 2008-11-11 19:38:12.000000000 +0000
++++ a 2008-11-11 19:38:26.000000000 +0000
+@@ -1 +1,2 @@
+ sample text
++and some more sample text
diff --git a/t/tests/patch-systems-quilt-description/debian/debian/patches/02_this_one_has_no_description b/t/tests/patch-systems-quilt-description/debian/debian/patches/02_this_one_has_no_description
new file mode 100644
index 0000000..12128b8
--- /dev/null
+++ b/t/tests/patch-systems-quilt-description/debian/debian/patches/02_this_one_has_no_description
@@ -0,0 +1,5 @@
+--- a.orig 2008-11-11 19:38:12.000000000 +0000
++++ a 2008-11-11 19:38:26.000000000 +0000
+@@ -1 +1,2 @@
+ sample text
++and some more sample text
diff --git a/t/tests/patch-systems-quilt-description/debian/debian/patches/series b/t/tests/patch-systems-quilt-description/debian/debian/patches/series
new file mode 100644
index 0000000..49780d7
--- /dev/null
+++ b/t/tests/patch-systems-quilt-description/debian/debian/patches/series
@@ -0,0 +1,2 @@
+01_this_patch_is_ok
+02_this_one_has_no_description
diff --git a/t/tests/patch-systems-quilt-description/tags b/t/tests/patch-systems-quilt-description/tags
new file mode 100644
index 0000000..d86ce98
--- /dev/null
+++ b/t/tests/patch-systems-quilt-description/tags
@@ -0,0 +1 @@
+W: patch-systems-quilt-description source: quilt-patch-missing-description 02_this_one_has_no_description
--
Debian package checker
Reply to: