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

[lintian] 02/02: Ignore commented-out patches in series files when checking the patch-file-present-but-not-mentioned-in-series tag.



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 82d06a6fab1b7a72fae5532d8f025b5411d70350
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Jan 22 15:47:28 2018 +1100

     Ignore commented-out patches in series files when checking the patch-file-present-but-not-mentioned-in-series tag.
---
 checks/patch-systems.desc                                           | 6 ++++++
 checks/patch-systems.pm                                             | 2 +-
 debian/changelog                                                    | 2 ++
 .../debian/debian/patches/file-commented-out                        | 1 +
 t/tests/patch-systems-quilt-general/debian/debian/patches/series    | 1 +
 5 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/checks/patch-systems.desc b/checks/patch-systems.desc
index a54e609..47301bc 100644
--- a/checks/patch-systems.desc
+++ b/checks/patch-systems.desc
@@ -202,3 +202,9 @@ Info: The specified patch is present under the <tt>debian/patches</tt>
  .
  This may mean that a patch was created with the intention of modifying
  the package but is not being applied.
+ .
+ Please either add the filename to the series file, or ensure it is
+ commented-out in a form that Lintian can recognise, for example:
+ .
+   0001_fix-foo.patch
+   # 0002_fix-bar.patch
diff --git a/checks/patch-systems.pm b/checks/patch-systems.pm
index 6461a91..c279f87 100644
--- a/checks/patch-systems.pm
+++ b/checks/patch-systems.pm
@@ -237,7 +237,7 @@ sub run {
             $known_files{$file->basename}++;
             my $fd = $file->open;
             while (<$fd>) {
-                $known_files{$1}++ if m{^\s*(\S+)};
+                $known_files{$1}++ if m{^\s*(?:#+\s*)?(\S+)};
             }
             close($fd);
         }
diff --git a/debian/changelog b/debian/changelog
index 82be2de..6988aa3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ lintian (2.5.72) UNRELEASED; urgency=medium
   * checks/patch-systems.{desc,pm}:
     + [CL] Ignore files called "README" or "README.patches" when checking
       packages for patch-file-present-but-not-mentioned-in-series.
+    + [CL] Ignore commented-out patches in series files when checking the
+      patch-file-present-but-not-mentioned-in-series tag.
 
  -- Chris Lamb <lamby@debian.org>  Sun, 21 Jan 2018 16:42:25 +1100
 
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/patches/file-commented-out b/t/tests/patch-systems-quilt-general/debian/debian/patches/file-commented-out
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/t/tests/patch-systems-quilt-general/debian/debian/patches/file-commented-out
@@ -0,0 +1 @@
+foo
diff --git a/t/tests/patch-systems-quilt-general/debian/debian/patches/series b/t/tests/patch-systems-quilt-general/debian/debian/patches/series
index edea10a..13bcfc7 100644
--- a/t/tests/patch-systems-quilt-general/debian/debian/patches/series
+++ b/t/tests/patch-systems-quilt-general/debian/debian/patches/series
@@ -4,3 +4,4 @@ some-nonexistent-patch
 # this is to test for directory traversals
 # 'debian-patch' is a file in the laboratory
 ../../debian-patch
+# file-commented-out

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: