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

[SCM] Debian package checker branch, master, updated. 2.5.2-106-g982c47d



The following commit has been merged in the master branch:
commit 982c47d023ac49ad1a339315105364972328a604
Author: Niels Thykier <niels@thykier.net>
Date:   Tue Sep 6 23:05:38 2011 +0200

    Remove the respect-display-level code
    
    The resulting semantics could trivially be achieved with a few
    calls to other parts of the Tags API.  Furthermore the code made
    Lintian::Tags harder to understand.
    
    This patch changes the semantics of --check-part so it now uses
    display-level settings again.  This is more consistent than the
    "intended 2.5.2" behaviour where --display-info was assumed.
    
    The --tags and --tags-from-file options will display the tags
    regardless of the display setting.  If the user has explicitly
    requested the tag, he/she should not have to pass up to 3
    other options to see it.

diff --git a/debian/changelog b/debian/changelog
index 608642a..617cd07 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -164,6 +164,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
       or --tags-from-file.  Previously, pedantic and experimental
       tags were not shown unless the relevant options were also
       passed.
+    + [JW,NT] Fixed a regression where --check-part ignored display
+      settings (such as --display-info).  (Closes: #640694)
 
   * lib/Util.pm:
     + [JW] Use LC_ALL rather than LANG, since LC_ALL overrules
@@ -191,6 +193,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
     + [NT,RG] Collect override comments and print the comments
       above the overridden tag (with --show-overrides).  Thanks
       to Carl Fürstenberg for the report.  (Closes: #474590)
+    + [NT] Remove the "respect-display-level" code.  It is not as
+      useful as intended.
   * lib/Text_utils.pm:
     + [NT] Close <p>-tags in dtml_to_html since the output is used
       in xhtml (xml), where all tags must be closed properly.
@@ -200,8 +204,8 @@ lintian (2.5.3) UNRELEASED; urgency=low
 
   * man/lintian.pod.in:
     + [JW] Fixed some stray POD markup.  (Closes: #640705)
-    + [JW,NT] Clarified that some options ignores the display
-      settings.  (Closes: #640694)
+    + [JW,NT] Clarified that --tags and --tags-from-file ignores
+      display settings.
 
   * profiles/debian/ftp-master-auto-reject.profile:
     + [NT] Refreshed to include udeb-uses-non-gzip-data-tarball.
diff --git a/frontend/lintian b/frontend/lintian
index 8a921a8..a7fcb2e 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -782,15 +782,17 @@ $TAGS->suppress(keys %suppress_tags) if %suppress_tags;
 if ($no_profile) {
     # No profile if we have been given explicit list
     $opt{'LINTIAN_PROFILE'} = '';
-    # If we are given explicit list, we use that regardless
-    # of show_pedantic/display.
-    $TAGS->respect_display_level(0);
     # if tags are listed explicitly (--tags) then show them even if
-    # they are pedantic/experimental.  However, for --check-part
-    # people explictly have to pass --display-experimental and
-    # --pedantic to see them (above).
-    $TAGS->show_experimental(1) if $check_tags;
-    $TAGS->show_pedantic(1) if $check_tags;
+    # they are pedantic/experimental etc.  However, for --check-part
+    # people explictly have to pass the relevant options.
+    if ($check_tags) {
+	$TAGS->show_experimental(1);
+	$TAGS->show_pedantic(1);
+	# discard whatever is in @display_level and request
+	# everything
+	@display_level = ();
+	display_infotags();
+    }
 } else {
     unless ($opt{'LINTIAN_PROFILE'}){
 	# Time to ask dpkg-vendor for a vendor name
@@ -811,17 +813,19 @@ if ($opt{'LINTIAN_PROFILE'}) {
 	my $tag = Lintian::Tag::Info->new($tagname);
 	$tag->set_severity($severity);
     }
-    # Initialize display level settings.
-    for my $level (@display_level) {
-	eval { $TAGS->display(@$level) };
-	if ($@) {
-	    my $error = $@;
-	    $error =~ s/ at .*//;
-	    die $error, "\n";
-	}
+}
+
+# Initialize display level settings.
+for my $level (@display_level) {
+    eval { $TAGS->display(@$level) };
+    if ($@) {
+	my $error = $@;
+	$error =~ s/ at .*//;
+	die $error, "\n";
     }
 }
 
+
 # }}}
 
 # {{{ Set up clean-up handlers.
diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index e6a6af9..6983574 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -157,7 +157,6 @@ sub new {
         non_overridable_tags => {},
         ignored_overrides    => {},
         only_issue           => {},
-        respect_display      => 1,
         show_experimental    => 0,
         show_overrides       => 0,
         show_pedantic        => 0,
@@ -726,7 +725,6 @@ sub displayed {
     my $only = $self->{only_issue};
     if (%$only) {
         return 0 unless $only->{$tag};
-        return 1 unless $self->{respect_display};
     } else {
         return 0 if $self->suppressed($tag);
     }
@@ -808,30 +806,6 @@ sub ignored_overrides {
     return $self->{ignored_overrides};
 }
 
-=item respect_display_level([BOOL])
-
-Whether or not the display level should be considered for
-tags that can be emitted.
-
-Calling this with a defined non-truth value and calling
-only(TAG) will emit all of the tags passed to only(),
-regardless of what is passed to show_pedantic() and
-display() etc.
-
-Returns the old value.
-
-Note: This does not effect suppressed tags, which will
-always be suppressed regardless.
-
-=cut
-
-sub respect_display_level{
-    my ($self, $val) = @_;
-    my $old = $self->{respect_display};
-    $self->{respect_display} = $val if defined $val;
-    return $old;
-}
-
 =back
 
 =head1 AUTHOR
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 1711c86..4bdd64a 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -67,11 +67,6 @@ Run only the specified checks.  You can either specify the name of the
 check script or the abbreviation.  For details, see the L</CHECKS> section
 below.
 
-With this options all normal tags from the checks will be displayed
-regardless of the display settings.  The pedantic and experimental
-tags from this given checks are only displayed if the relevant options
-are passed as well.  (see B<--pedantic> and B<--display-experimental>)
-
 Note: This option skips profile loading, even if B<--profile> was passed.
 
 =item B<-F>, B<--ftp-master-rejects>

-- 
Debian package checker


Reply to: