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

Bug#709379: [lintian] Fix false negative for gfdl detection



Package: lintian
Version: 2.5.12
Severity: normal
tags: patch

Please apply this patch
From c64e4125c14f56148e44d30f85005984c96eb037 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Wed, 22 May 2013 23:07:24 +0200
Subject: [PATCH] Fix a false negative

Allow brace for texi arround GNU like @acronym{GNU}
---
 checks/cruft                                           |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/autoconf.texi |   12 ++++++++++++
 t/tests/cruft-gfdl-invariants/tags                     |    1 +
 3 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/autoconf.texi

diff --git a/checks/cruft b/checks/cruft
index b401e35..a2ac871 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -480,7 +480,7 @@ sub find_cruft {
                 # if the "redeeming" part is in the next block.
                 #
                 # See cruft-gfdl-fp-sliding-win for the test case
-                when(m/GNU (?:\s+|\s*<\/span>\s*|\s*\\s\d\s*)? Free \s+ Documentation \s+ License (?'gfdlsections'.{0,1024})
+                when(m/GNU (?:\s+|\s*<\/span>\s*|\s*\\s\d\s*|\s*\}\s+)? Free \s+ Documentation \s+ License (?'gfdlsections'.{0,1024})
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/autoconf.texi b/t/tests/cruft-gfdl-invariants/debian/src/autoconf.texi
new file mode 100644
index 0000000..8d765f5
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/autoconf.texi
@@ -0,0 +1,12 @@
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the @acronym{GNU} Free Documentation License,
+Version 1.3 or any later version published by the Free Software
+Foundation; with no Invariant Sections, with the Front-Cover texts
+being ``A @acronym{GNU} Manual,'' and with the Back-Cover Texts as in
+(a) below.  A copy of the license is included in the section entitled
+``@acronym{GNU} Free Documentation License.''
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this @acronym{GNU} manual.  Buying copies from the @acronym{FSF}
+supports it in developing @acronym{GNU} and promoting software
+freedom.''
\ No newline at end of file
diff --git a/t/tests/cruft-gfdl-invariants/tags b/t/tests/cruft-gfdl-invariants/tags
index 85931f4..6e67acc 100644
--- a/t/tests/cruft-gfdl-invariants/tags
+++ b/t/tests/cruft-gfdl-invariants/tags
@@ -1,3 +1,4 @@
+E: cruft-gfdl-invariants source: license-problem-gfdl-invariants src/autoconf.texix
 E: cruft-gfdl-invariants source: license-problem-gfdl-invariants src/frontback.html
 E: cruft-gfdl-invariants source: license-problem-gfdl-invariants src/frontback.texi
 E: cruft-gfdl-invariants source: license-problem-gfdl-invariants src/invariant.txt
-- 
1.7.10.4


Reply to: