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

[SCM] Debian package checker branch, master, updated. 2.5.2-39-g45b90f1



The following commit has been merged in the master branch:
commit a6144a09f2ece3ffb36bac669de674c061181e10
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Aug 18 16:28:21 2011 +0200

    Renamed ignore-overrides to non-overridable-tags
    
    Renamed variables and methods to better reflect their purpose.

diff --git a/frontend/lintian b/frontend/lintian
index 0625b61..9f867c1 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -796,11 +796,11 @@ if ($opt{'LINTIAN_PROFILE'}) {
     my $profile = Lintian::Profile->new($opt{'LINTIAN_PROFILE'},
 					[@prof_inc, "$opt{'LINTIAN_ROOT'}/profiles"]);
     my @ptags = $profile->tags;
-    my @ign_overrides = $profile->ignored_overrides;
+    my @non_overridable = $profile->non_overridable_tags;
     my $severities = $profile->severity_changes;
     v_msg('Using profile ' . $profile->name . '.');
     $TAGS->only(@ptags) if @ptags;
-    $TAGS->ignore_overrides(@ign_overrides) if @ign_overrides;
+    $TAGS->non_overridable_tags(@non_overridable) if @non_overridable;
     while ( my ($tagname, $severity) = each(%$severities) ){
 	my $tag = Lintian::Tag::Info->new($tagname);
 	$tag->set_severity($severity);
diff --git a/lib/Lintian/Profile.pm b/lib/Lintian/Profile.pm
index 76b5fcc..5e4739d 100644
--- a/lib/Lintian/Profile.pm
+++ b/lib/Lintian/Profile.pm
@@ -129,12 +129,12 @@ sub new {
         if $name =~ m,^/,o or $name =~ m/\./o;
     _load_checks() unless %TAG_MAP;
     my $self = {
-        'parent-map'        => {},
-        'parents'           => [],
-        'profile-path'      => $ppath,
-        'enabled-tags'      => {},
-        'ignored-overrides' => {},
-        'severity-changes'  => {},
+        'parent-map'           => {},
+        'parents'              => [],
+        'profile-path'         => $ppath,
+        'enabled-tags'         => {},
+        'non-overridable-tags' => {},
+        'severity-changes'     => {},
     };
     $self = bless $self, $type;
     $profile = $self->find_profile($name);
@@ -189,7 +189,7 @@ sub severity_changes {
     return $self->{'severity-changes'};
 }
 
-=item $prof->ignored_overrides
+=item $prof->non_overridable_tags
 
 List of tags that has been marked as non-overridable.
 
@@ -197,9 +197,9 @@ Note: This list nor its contents should be modified.
 
 =cut
 
-sub ignored_overrides {
+sub non_overridable_tags {
     my ($self) = @_;
-    return keys %{ $self->{'ignored-overrides'} };
+    return keys %{ $self->{'non-overridable-tags'} };
 }
 
 =item Lintian::Profile->find_profile($pname, @dirs), $prof->find_profile($pname[, @dirs])
@@ -292,7 +292,7 @@ sub _read_profile_section {
     my @tags = $self->_split_comma_sep_field($section->{'tags'});
     my $overridable = $self->_parse_boolean($section->{'overridable'}, -1, $pname, $sno);
     my $severity = $section->{'severity'}//'';
-    my $ignore_map = $self->{'ignored-overrides'};
+    my $noover = $self->{'non-overridable-tags'};
     my $sev_map = $self->{'severity-changes'};
     $self->_check_for_invalid_fields($section, \%SEC_FIELDS, $pname, "section $sno");
     croak "Profile \"$pname\" is missing Tags field (or it is empty) in section $sno.\n" unless @tags;
@@ -303,9 +303,9 @@ sub _read_profile_section {
         $sev_map->{$tag} = $severity if $severity;
         if ( $overridable != -1 ) {
             if ($overridable) {
-                delete $ignore_map->{$tag};
+                delete $noover->{$tag};
             } else {
-                $ignore_map->{$tag} = 1;
+                $noover->{$tag} = 1;
             }
         }
     }
diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index 9dcf59f..78e47a6 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -151,16 +151,16 @@ sub new {
             important => { 'wild-guess' => 1, possible => 1, certain => 1 },
             serious   => { 'wild-guess' => 1, possible => 1, certain => 1 },
         },
-        display_source    => {},
-        files             => {},
-        ignored_overrides => {},
-        only_issue        => {},
-        respect_display   => 1,
-        show_experimental => 0,
-        show_overrides    => 0,
-        show_pedantic     => 0,
-        statistics        => {},
-        suppress          => {},
+        display_source       => {},
+        files                => {},
+        non_overridable_tags => {},
+        only_issue           => {},
+        respect_display      => 1,
+        show_experimental    => 0,
+        show_overrides       => 0,
+        show_pedantic        => 0,
+        statistics           => {},
+        suppress             => {},
     };
     bless($self, $class);
     $GLOBAL = $self unless $GLOBAL;
@@ -537,7 +537,7 @@ file cannot be opened.
 
 sub file_overrides {
     my ($self, $overrides) = @_;
-    my $ignored = $self->{ignored_overrides};
+    my $ignored = $self->{non_overridable_tags};
     unless (defined $self->{current}) {
         die 'no current file when adding overrides';
     }
@@ -738,15 +738,15 @@ sub suppressed {
     return;
 }
 
-=item ignore_overrides(TAG[, ...])
+=item non_overridable_tags(TAG[, ...])
 
-Ignores all future overrides for all tags given as arguments.
+Marks all tags (given as arguments) for non-overridable.
 
 =cut
 
-sub ignore_overrides {
+sub non_overridable_tags {
     my ($self, @tags) = @_;
-    my $ignored = $self->{ignored_overrides};
+    my $ignored = $self->{non_overridable_tags};
     foreach my $tag (@tags){
         $ignored->{$tag} = 1;
     }

-- 
Debian package checker


Reply to: