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

[SCM] Debian package checker branch, master, updated. 2.3.0-48-g84cad0f



The following commit has been merged in the master branch:
commit 84cad0f9cf37a09c8e03ac70b8aa776c58e9789b
Author: Russ Allbery <rra@debian.org>
Date:   Fri Jan 1 20:06:46 2010 -0800

    Avoid false positives for patches created in debian working dir
    
    * checks/patch-systems:
      + [RA] Avoid false positives for patches modifying files in debian/*
        when the parent directory in which the patch was created is named
        debian.  Thanks, Mark Brown.  (Closes: #562875)

diff --git a/checks/patch-systems b/checks/patch-systems
index 0f5b060..d91d358 100644
--- a/checks/patch-systems
+++ b/checks/patch-systems
@@ -194,14 +194,21 @@ sub run {
 	}
 }
 
-# Checks on patches common to all build systems
+# Checks on patches common to all build systems.
 sub check_patch($) {
 	my $patch_file = shift;
-	open(DIFFSTAT, "-|", "diffstat -p0 -l debfiles/patches/$patch_file")
+
+	# Use -p1 to strip off the first layer of directory in case the parent
+	# directory in which the patches were generated was named "debian".
+	# This will produce false negatives for -p0 patches that modify files
+	# in the debian/* directory, but as of 2010-01-01, all cases where the
+	# first level of the patch path is "debian/" in the archive are false
+	# positives.
+	open(DIFFSTAT, "-|", "diffstat -p1 -l debfiles/patches/$patch_file")
 	  or fail("can't fork diffstat");
 	while (<DIFFSTAT>) {
 		chomp;
-		if (m|^(\./)?debian/| or m|^(\./)?[^/]+/debian/|) {
+		if (m|^(\./)?debian/|) {
 			tag "patch-modifying-debian-files", $patch_file, $_;
 		}
 	}
diff --git a/debian/changelog b/debian/changelog
index ea317fc..f37bfdb 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,10 @@ lintian (2.3.1) UNRELEASED; urgency=low
   * checks/manpages.desc:
     + [RA] Downgrade spelling-error-in-manpage to minor severity.
       (Closes: #563039)
+  * checks/patch-systems:
+    + [RA] Avoid false positives for patches modifying files in debian/*
+      when the parent directory in which the patch was created is named
+      debian.  Thanks, Mark Brown.  (Closes: #562875)
 
   * collection/ar-info:
     + [RA] Skip *.a files that are dangling symlinks and discard error
diff --git a/t/COVERAGE b/t/COVERAGE
index fc72dbd..01aa7c2 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,4 +1,4 @@
-Last generated 2009-12-27
+Last generated 2010-01-02
 
 The following tags are not tested by the test suite:
 
@@ -162,11 +162,7 @@ menus prerm-calls-updatemenus
 
 nmu changelog-is-symlink
 
-patch-systems more-than-one-patch-system
-patch-systems patch-modifying-debian-files
-patch-systems quilt-patch-with-non-standard-options
 patch-systems quilt-series-but-no-build-dep
-patch-systems quilt-series-references-non-existent-patch
 
 po-debconf missing-file-from-potfiles-in
 po-debconf missing-potfiles-in
@@ -443,8 +439,6 @@ nmu changelog-should-not-mention-nmu
 nmu orphaned-package-should-not-have-uploaders
 nmu qa-upload-has-incorrect-version-number
 
-patch-systems dpatch-build-dep-but-no-patch-list
-patch-systems patch-system-but-direct-changes-in-diff
 patch-systems quilt-build-dep-but-no-series-file
 
 po-debconf invalid-po-file
@@ -576,7 +570,6 @@ cdbs-test
   no-human-maintainers
 
 debconf
-  dpatch-build-dep-but-no-patch-list
   invalid-po-file
   loads-obsolete-confmodule
   making-assumptions-about-interfaces-in-templates
@@ -632,7 +625,6 @@ debug
 
 diffs
   arch-independent-package-contains-binary-or-object
-  patch-system-but-direct-changes-in-diff
 
 etcfiles
   file-in-etc-not-marked-as-conffile
diff --git a/t/tests/patch-systems-quilt-general/debian/README b/t/tests/patch-systems-quilt-general/debian/README
new file mode 100644
index 0000000..55d9771
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/README
@@ -0,0 +1 @@
+Debian README
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/README.source b/t/tests/patch-systems-quilt-general/debian/debian/README.source
new file mode 100644
index 0000000..052084e
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/debian/README.source
@@ -0,0 +1 @@
+Some stuff about quilt here.
diff --git a/t/tests/debhelper-dh-clean-k-ok/debian/debian/control.in b/t/tests/patch-systems-quilt-general/debian/debian/control.in
similarity index 89%
copy from t/tests/debhelper-dh-clean-k-ok/debian/debian/control.in
copy to t/tests/patch-systems-quilt-general/debian/debian/control.in
index 76b52f1..b00f59d 100644
--- a/t/tests/debhelper-dh-clean-k-ok/debian/debian/control.in
+++ b/t/tests/patch-systems-quilt-general/debian/debian/control.in
@@ -3,7 +3,7 @@ Priority: extra
 Section: {$section}
 Maintainer: {$author}
 Standards-Version: {$standards_version}
-Build-Depends: debhelper (>= 6)
+Build-Depends: debhelper (>= 7.0.50~), quilt, dpatch
 
 Package: {$srcpkg}
 Architecture: {$architecture}
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/patches/series b/t/tests/patch-systems-quilt-general/debian/debian/patches/series
new file mode 100644
index 0000000..8be8c70
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/debian/patches/series
@@ -0,0 +1,3 @@
+some-file
+some-other-file -p0
+some-nonexistent-patch
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/patches/some-file b/t/tests/patch-systems-quilt-general/debian/debian/patches/some-file
new file mode 100644
index 0000000..7749d40
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/debian/patches/some-file
@@ -0,0 +1,11 @@
+Some regular patch creating a file.
+
+--- /dev/null
++++ debian/debian/some-file
+@@ -0,0 +1,6 @@
++Some
++file
++created
++in
++debian
++directory.
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/patches/some-other-file b/t/tests/patch-systems-quilt-general/debian/debian/patches/some-other-file
new file mode 100644
index 0000000..ed24c8f
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/debian/patches/some-other-file
@@ -0,0 +1,12 @@
+Some -p0 patch creating a file.
+
+--- /dev/null
++++ debian/some-other-file
+@@ -0,0 +1,7 @@
++Some
++other
++file
++created
++in
++debian
++directory.
diff --git a/t/tests/patch-systems-quilt-general/desc b/t/tests/patch-systems-quilt-general/desc
new file mode 100644
index 0000000..d512140
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/desc
@@ -0,0 +1,12 @@
+Testname: patch-systems-quilt-general
+Sequence: 6000
+Type: non-native
+Version: 1.0-1
+Description: General tests of a quilt patch system
+Test-For:
+ dpatch-build-dep-but-no-patch-list
+ more-than-one-patch-system
+ patch-modifying-debian-files
+ patch-system-but-direct-changes-in-diff
+ quilt-patch-with-non-standard-options
+ quilt-series-references-non-existent-patch
diff --git a/t/tests/patch-systems-quilt-general/tags b/t/tests/patch-systems-quilt-general/tags
new file mode 100644
index 0000000..38e023f
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/tags
@@ -0,0 +1,6 @@
+E: patch-systems-quilt-general source: patch-modifying-debian-files some-file debian/some-file
+E: patch-systems-quilt-general source: quilt-series-references-non-existent-patch some-nonexistent-patch
+W: patch-systems-quilt-general source: dpatch-build-dep-but-no-patch-list
+W: patch-systems-quilt-general source: more-than-one-patch-system
+W: patch-systems-quilt-general source: patch-system-but-direct-changes-in-diff README
+W: patch-systems-quilt-general source: quilt-patch-with-non-standard-options some-other-file
diff --git a/t/tests/basic-non-native-with-epoch/upstream/README b/t/tests/patch-systems-quilt-general/upstream/README
similarity index 100%
copy from t/tests/basic-non-native-with-epoch/upstream/README
copy to t/tests/patch-systems-quilt-general/upstream/README

-- 
Debian package checker


Reply to: