lintian: r140 - in trunk: debian frontend man
Author: he
Date: 2004-04-10 03:17:50 +0200 (Sat, 10 Apr 2004)
New Revision: 140
Modified:
trunk/debian/changelog
trunk/frontend/lintian
trunk/man/lintian.1
Log:
* frontend/lintian:
+ [HE] Added a --dont-check-parts|-X option to allow users to specify
which tests should not be run. Also added infos about this to the
manpage. (Closes: #206674)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-04-09 01:49:49 UTC (rev 139)
+++ trunk/debian/changelog 2004-04-10 01:17:50 UTC (rev 140)
@@ -11,6 +11,11 @@
correspoding perl warnings the fixed parts are probably never
used in the current code)
+ * frontend/lintian:
+ + [HE] Added a --dont-check-parts|-X option to allow users to specify
+ which tests should not be run. Also added infos about this to the
+ manpage. (Closes: #206674)
+
* checks/binaries:
+ [JvW] Ignore static binaries in /usr/lib/debug
* checks/common_data:
Modified: trunk/frontend/lintian
===================================================================
--- trunk/frontend/lintian 2004-04-09 01:49:49 UTC (rev 139)
+++ trunk/frontend/lintian 2004-04-10 01:17:50 UTC (rev 140)
@@ -67,6 +67,7 @@
my $action;
my $checks;
+my $dont_check;
my $unpack_info;
my $cwd;
my $cleanup_filename;
@@ -126,6 +127,7 @@
-R, --remove-lab remove static lab
-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
-u, --unpack only unpack packages in the lab
-r, --remove remove package from the lab
General options:
@@ -183,11 +185,14 @@
}
# Record Parts requested for checking
-# Optoins: -C|--check-part
+# Options: -C|--check-part
sub record_check_part {
if (defined $action and $action eq 'check' and $checks) {
die("multiple -C or --check-part options not allowed");
}
+ if ($dont_check) {
+ die("both -C or --check-part and -X or --dont-check-part options not allowed");
+ }
if ($action) {
die("too many actions specified: $_[0]");
}
@@ -195,6 +200,23 @@
$checks = $_[1];
}
+# Record Parts requested not to check
+# Options: -X|--dont-check-part X
+sub record_dont_check_part {
+ if (defined $action and $action eq 'check' and $dont_check) {
+ die("multiple -x or --dont-check-part options not allowed");
+ }
+ if ($checks) {
+ die("both -C or --check-part and -X or --dont-check-part options not allowed");
+ }
+ if ($action) {
+ die("too many actions specified: $_[0]");
+ }
+ $action = 'check';
+ $dont_check = $_[1];
+}
+
+
# Process for -U|--unpack-info flag
sub record_unpack_info {
if ($unpack_info) {
@@ -217,6 +239,7 @@
"remove-lab|R" => \&record_action,
"check|c" => \&record_action,
"check-part|C=s" => \&record_check_part,
+ "dont-check-part|X=s" => \&record_dont_check_part,
"unpack|u" => \&record_action,
"remove|r" => \&record_action,
@@ -922,11 +945,17 @@
# determine which checks have been requested
if ($action eq 'check') {
+ my %dont_check = map { $_ => 1 } (split /,/, ($dont_check || ""));
$checks or ($checks = join(',',keys %check_info));
for my $c (split(/,/,$checks)) {
if ($check_info{$c}) {
- $checks{$c} = 1;
+ if ($dont_check{$c} || ($check_info{$c}->{'abbrev'} && $dont_check{$check_info{$c}->{'abbrev'}})) {
+ #user requested not to run this check
+ } else {
+ $checks{$c} = 1;
+ }
} elsif (exists $check_abbrev{$c}) {
+ #abbrevs only used when -C is given, so we don't need %dont_check
$checks{$check_abbrev{$c}} = 1;
} else {
fail("unknown check specified: $c");
Modified: trunk/man/lintian.1
===================================================================
--- trunk/man/lintian.1 2004-04-09 01:49:49 UTC (rev 139)
+++ trunk/man/lintian.1 2004-04-10 01:17:50 UTC (rev 140)
@@ -85,6 +85,12 @@
For details, see the CHECKS section below.
.TP
+.BR \-X " chk1,chk2,..., " \-\-dont\-check\-part " chk1,chk2,..."
+Run all but the the specified checks. You can either specify
+the name of the check script or the abbreviation.
+For details, see the CHECKS section below.
+
+.TP
.BR \-u ", " \-\-unpack
Unpack the specified packages up to the current unpack level.
The default unpack level is 1 for this option. See the UNPACK
Reply to: