[SCM] Debian package checker branch, master, updated. 1.24.4-57-gcfdcbc8
The following commit has been merged in the master branch:
commit 7dedddb40aa82cda92647b2e6ec8b7f40332ba7a
Author: Jordà Polo <jorda@ettin.org>
Date: Sun Aug 17 18:11:48 2008 +0200
Set shared Tags::* variables before tagging
Some tags from the "lintian" checkset can be called before the settings are
properly set, which can lead to unexpected behaviour (e.g. if colored output
is enabled, all tags will be colored except those from the "lintian"
checkset). This change simply moves the settings to ensure everything is set
as soon as possible.
diff --git a/frontend/lintian b/frontend/lintian
index cc1de30..2c6409d 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -616,6 +616,32 @@ my @l_secs = read_dpkg_control("$LINTIAN_ROOT/checks/lintian.desc");
shift(@l_secs);
map { $_->{'script'} = 'lintian'; Tags::add_tag($_) } @l_secs;
+no warnings 'once';
+if (defined $experimental_output_opts) {
+ my %opts = map { split(/=/) } split( /,/, $experimental_output_opts );
+ foreach (keys %opts) {
+ if ($_ eq 'format') {
+ if ($opts{$_} eq 'colons') {
+ require Tags::ColonSeparated;
+ $Tags::output_formatter = \&Tags::ColonSeparated::print_tag;
+ } elsif ($opts{$_} eq 'letterqualifier') {
+ require Tags::LetterQualifier;
+ $Tags::output_formatter = \&Tags::LetterQualifier::print_tag;
+ }
+ }
+ no strict 'refs';
+ ${"Tags::$_"} = $opts{$_};
+ }
+}
+
+$Tags::show_experimental = $display_experimentaltags;
+$Tags::show_overrides = $show_overrides;
+%Tags::display_level = %display_level;
+$Tags::color = $color;
+%Tags::only_issue_tags = map { $_ => 1 } (split(/,/, $check_tags))
+ if defined $check_tags;
+use warnings;
+
# }}}
# {{{ No clue why this code is here...
@@ -1063,32 +1089,6 @@ closedir(COLLDIR);
# {{{ Now we're ready to load info about checks & tags
-no warnings 'once';
-if (defined $experimental_output_opts) {
- my %opts = map { split(/=/) } split( /,/, $experimental_output_opts );
- foreach (keys %opts) {
- if ($_ eq 'format') {
- if ($opts{$_} eq 'colons') {
- require Tags::ColonSeparated;
- $Tags::output_formatter = \&Tags::ColonSeparated::print_tag;
- } elsif ($opts{$_} eq 'letterqualifier') {
- require Tags::LetterQualifier;
- $Tags::output_formatter = \&Tags::LetterQualifier::print_tag;
- }
- }
- no strict 'refs';
- ${"Tags::$_"} = $opts{$_};
- }
-}
-
-$Tags::show_experimental = $display_experimentaltags;
-$Tags::show_overrides = $show_overrides;
-%Tags::display_level = %display_level;
-$Tags::color = $color;
-%Tags::only_issue_tags = map { $_ => 1 } (split(/,/, $check_tags))
- if defined $check_tags;
-use warnings;
-
# load information about checker scripts
opendir(CHECKDIR, "$LINTIAN_ROOT/checks")
or fail("cannot read directory $LINTIAN_ROOT/checks");
--
Debian package checker
Reply to: