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

[SCM] Debian package checker branch, master, updated. 1.24.2-91-gadf18ef



The following commit has been merged in the master branch:
commit adf18ef5eb922fa581e8246ff7673969afbcc8df
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Fri Aug 8 19:36:50 2008 +0100

    Make --tags issue _only_ the requested tags.
    
    Modify the functionality of --tags so that only those tags are issued.
    The entire check script(s) containing the tags is still run but
    other tags are silently ignored.

diff --git a/debian/changelog b/debian/changelog
index f029ce2..fc598dd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,13 +122,13 @@ lintian (1.24.3) unstable; urgency=low
     + [ADB] Update the description of tags to include experimental and info
       tags.
   * doc/README:
-    + [ADB] Add -E / --show-experimental to the option list
+    + [ADB] Add -E / --show-experimental, -T / --tags and --tags-from-file
+      to the option list.
   
   * frontend/lintian:
-    + [FL] Add new --tags/-T option to limit the amount of checks
+    + [FL, ADB] Add new --tags/-T option to limit the amount of checks
       run not by check names but by names of tags you're interested
-      in. This will not suppress other tags in the selected checks!
-      Requested by Joerg Jaspert for ftpmaster.  (Closes: #493903)
+      in.  Requested by Joerg Jaspert for ftpmaster.  (Closes: #493903)
     + [FL] Add --tags-from-file option to make it easier to specify
       a long list of tags.
 
@@ -140,6 +140,9 @@ lintian (1.24.3) unstable; urgency=low
     + [ADB] Add support for parsing the "scripts" index file
   * lib/Read_taginfo.pm:
     + [FL] Handle URLs in the Ref: field.
+  * lib/Tags.pm:
+    + [ADB] If --tags was used, don't issue tags that aren't in the provided
+      list.
 
   * man/lintian.1
     + [ADB] Update the list of check scripts, removing the no longer present
diff --git a/doc/README b/doc/README
index fc36eb7..c221ae3 100644
--- a/doc/README
+++ b/doc/README
@@ -59,6 +59,8 @@ Command line options of the lintian command
     -c, --check                check packages (default action)
     -C X, --check-part X       check only certain aspects
     -X X, --dont-check-part X  don't check certain aspects
+    -T X, --tags X             only run checks needed for requested tags
+    --tags-from-file X         like --tags, but read list from file
     -u, --unpack               only unpack packages in the lab
     -r, --remove               remove package from the lab
   General options:
diff --git a/frontend/lintian b/frontend/lintian
index e0eebd6..d40ffae 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -1023,6 +1023,8 @@ $Tags::show_info = $display_infotags;
 $Tags::show_experimental = $display_experimentaltags;
 $Tags::show_overrides = $show_overrides;
 $Tags::color = $color;
+%Tags::only_issue_tags = map { $_ => 1 } (split(/,/, $check_tags))
+    if defined $check_tags;
 use warnings;
 
 # load information about checker scripts
diff --git a/lib/Tags.pm b/lib/Tags.pm
index b34ab8b..1ae2149 100644
--- a/lib/Tags.pm
+++ b/lib/Tags.pm
@@ -47,6 +47,7 @@ our $max_severity = 99;
 our $min_significance = 1;
 our $max_significance = 99;
 our $color = 'never';
+our %only_issue_tags;
 
 # The master hash with all tag info. Key is the tag name, value another hash
 # with the following keys:
@@ -332,6 +333,9 @@ sub tag {
 	return 0;
     }
 
+    return 0 unless
+	! keys %only_issue_tags or exists $only_issue_tags{$tag};
+
     # Newlines in @information would cause problems, so replace them with \n.
     @information = map { s,\n,\\n,; $_ } @information;
 
diff --git a/man/lintian.1 b/man/lintian.1
index ab9f3f6..f06bb5b 100644
--- a/man/lintian.1
+++ b/man/lintian.1
@@ -89,12 +89,13 @@ For details, see the CHECKS section below.
 
 .TP
 .BR \-T " tag1,tag2,...m " \-\-tags " tag1,tag2,..."
-Run only the checks that issue the requested tags.  This
-will not supress other tags issues by the checks' run!
+Run only the checks that issue the requested tags.  The tests for
+other tags within the check scripts will be run but the tags will
+not be issued.
 
 .TP
 .BR \-\-tags\-from\-file " filename"
-Same functionality like
+Same functionality as
 .BR \-\-tags ,
 but read the list of tags from a file, one per line.
 

-- 
Debian package checker


Reply to: