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

rouca pushed a commit to branch tagrename
in repository lintian.

commit ab1af5d4ab4a9b42f335576aa3c9fe21867f19eb
Author: Bastien ROUCARIÈS <roucaries.bastien+deb...@gmail.com>
Date:   Sat Aug 15 22:56:25 2015 +0200

    Warn about renamed tag
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+deb...@gmail.com>
---
 checks/lintian.desc          | 10 ++++++++++
 lib/Lintian/Tags.pm          |  9 +++++++--
 t/tests/overrides-shown/desc |  3 ++-
 t/tests/overrides-shown/tags |  1 +
 t/tests/overrides/desc       |  2 ++
 t/tests/overrides/tags       |  1 +
 6 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/checks/lintian.desc b/checks/lintian.desc
index 3b57382..15c93d7 100644
--- a/checks/lintian.desc
+++ b/checks/lintian.desc
@@ -18,6 +18,16 @@ Info: Lintian discovered an unused override entry in its 
database.
  If the override is unused, please remove it from the overrides file.
 
 
+Tag: renamed-override
+Severity: pedantic
+Certainty: certain
+Info: Lintian discovered an renamed override entry in its database.
+ Lintian tag are sometime renamed in order to improve description.
+ .
+ Override file is dynamically translated by lintian. Nevertheless
+ please replace the old name by the new name.
+
+
 Tag: malformed-override
 Severity: important
 Certainty: certain
diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index b0ef395..65590bd 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -605,7 +605,8 @@ sub file_overrides {
                 next unless $found;
             }
 
-            if ($last_over && $last_over->tag eq $rawtag && !scalar 
@$comments) {
+            if ($last_over && $last_over->tag eq $rawtag && !scalar @$comments)
+            {
                 # There are no new comments, no "empty line" in between and
                 # this tag is the same as the last, so we "carry over" the
                 # comment from the previous override (if any).
@@ -624,8 +625,12 @@ sub file_overrides {
             # tag will be changed here if renamed reread
             $tag = $tagover->{'tag'};
 
+            unless($tag eq $rawtag) {
+                tag('renamed-override',"$rawtag => $tag at line $.");
+            }
+
             # treat here ignored overrides
-             if ($profile && !$profile->is_overridable($tag)) {
+            if ($profile && !$profile->is_overridable($tag)) {
                 $self->{ignored_overrides}{$tag}++;
                 next;
             }
diff --git a/t/tests/overrides-shown/desc b/t/tests/overrides-shown/desc
index 3becd5f..d44a42a 100644
--- a/t/tests/overrides-shown/desc
+++ b/t/tests/overrides-shown/desc
@@ -1,7 +1,8 @@
 Testname: overrides-shown
 Sequence: 1500
 Version: 1.0
-Options: --show-overrides -I -E
+Skeleton: pedantic
+Options: --pedantic --show-overrides -I -E
 Sort: no
 Architecture: any
 Description: Test override handling
diff --git a/t/tests/overrides-shown/tags b/t/tests/overrides-shown/tags
index 075742d..1ae7b6d 100644
--- a/t/tests/overrides-shown/tags
+++ b/t/tests/overrides-shown/tags
@@ -1,3 +1,4 @@
+P: overrides-shown: renamed-override package-install-apt-sources => 
package-installs-apt-sources at line 18
 N: renamed tag
 O: overrides-shown: package-installs-apt-sources etc/apt/sources.list.d/
 N: renamed tag
diff --git a/t/tests/overrides/desc b/t/tests/overrides/desc
index e27a624..a1edb0a 100644
--- a/t/tests/overrides/desc
+++ b/t/tests/overrides/desc
@@ -1,5 +1,7 @@
 Testname: overrides
 Sequence: 1500
 Version: 1.0
+Skeleton: pedantic
+Options: --pedantic -I -E
 Description: Test override handling
 Architecture: any
diff --git a/t/tests/overrides/tags b/t/tests/overrides/tags
index 8cbb094..0557d93 100644
--- a/t/tests/overrides/tags
+++ b/t/tests/overrides/tags
@@ -2,3 +2,4 @@ I: overrides: FSSTND-dir-in-manual-page 
usr/share/man/man1/foo.1.gz:12 /usr/info
 I: overrides: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:13 
/usr/man/
 I: overrides: FSSTND-dir-in-manual-page usr/share/man/man1/foo.1.gz:14 
/usr/adm/
 N: 12 tags overridden (2 errors, 1 warning, 9 info)
+P: overrides: renamed-override package-install-apt-sources => 
package-installs-apt-sources at line 18

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

Reply via email to