[lintian] 03/06: lintian: Remove --all, -b, -s and --udeb options
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ac60081d8526c8d29b1f23b72d03cbb94e6f6590
Author: Niels Thykier <niels@thykier.net>
Date: Mon Mar 17 22:04:44 2014 +0100
lintian: Remove --all, -b, -s and --udeb options
This removes all "Package Selection Options" except
"--packages-from-file". This options is now shown under the
"dev/special usage" section, since having an entire section for a
single option seems like overkill.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
frontend/lintian | 61 +++++++++----------------------------------------
man/lintian.pod.in | 66 +++++++++++++-----------------------------------------
2 files changed, 25 insertions(+), 102 deletions(-)
diff --git a/frontend/lintian b/frontend/lintian
index c431170..d7743a5 100755
--- a/frontend/lintian
+++ b/frontend/lintian
@@ -97,10 +97,8 @@ my $BANNER = "Lintian v$LINTIAN_VERSION"; #Version Banner - text form
# Variables used to record commandline options
# Commented out variables have "defined" checks somewhere to determine if
# they were set via commandline or environment variables
-my $pkg_mode = 'auto'; # auto -- automatically search for
# binary and source pkgs
my $debug = 0;
-my $check_everything = 0; #flag for -a|--all switch
my $ftpmaster_tags = 0; #flag for -F|--ftp-master-rejects switch
my $allow_root = 0; #flag for --allow-root switch
my $keep_lab = 0; #flag for --keep-lab switch
@@ -239,16 +237,11 @@ Developer/Special usage options:
-d, --debug turn Lintian\'s debug messages on (repeatable)
--keep-lab keep lab after run, even if temporary
--lab LABDIR use LABDIR as permanent laboratory
+ --packages-from-file X process the packages in a file (if "-" use stdin)
--perf-debug turn on performance debugging
--perf-output X send performance logging to file (or fd w. \&X)
--status-log X send status logging to file (or fd w. \&X) [internal use only]
-U X, --unpack-info X specify which info should be collected
-Package selection options:
- -a, --all process all packages in distribution
- -b, --binary process only binary packages
- --packages-from-file X process the packages in a file (if "-" use stdin)
- -s, --source process only source packages
- --udeb process only udeb packages
EOT-EOT-EOT
}
@@ -385,15 +378,6 @@ sub record_dont_check_part {
return;
}
-# Record what type of data is specified
-# Options: -b|--binary, -s|--source, --udeb
-sub record_pkgmode {
- $pkg_mode = 'binary' if $_[0] eq 'binary';
- $pkg_mode = 'source' if $_[0] eq 'source';
- $pkg_mode = 'udeb' if $_[0] eq 'udeb';
- return;
-}
-
# Process -L|--display-level flag
sub record_display_level {
my ($option, $level) = @_;
@@ -590,10 +574,6 @@ my %opthash = (
'user-dirs!' => \&record_option_too_late,
# ------------------ package selection options
- 'all|a' => \$check_everything,
- 'binary|b' => \&record_pkgmode,
- 'source|s' => \&record_pkgmode,
- 'udeb' => \&record_pkgmode,
'packages-from-file=s' => \$opt{'packages-from-file'},
# ------------------ experimental
@@ -699,12 +679,11 @@ foreach my $var (@ENV_VARS) {
# {{{ Sanity check command-line options (that are unaffected by the configuration file)
# option --all and packages specified at the same time?
-if (($check_everything or $opt{'packages-from-file'}) and $#ARGV+1 > 0) {
+if ($opt{'packages-from-file'} and $#ARGV+1 > 0) {
print STDERR join(q{ },
- 'warning: options -a and --packages-from-file',
+ 'warning: option --packages-from-file',
"cannot be mixed with package parameters!\n");
- print STDERR "(will ignore -a or/and --packages-from-file option)\n";
- undef $check_everything;
+ print STDERR "(will ignore --packages-from-file option)\n";
delete $opt{'packages-from-file'};
}
@@ -890,7 +869,6 @@ if (my $status_log = $opt{'status-log'}) {
# check for arguments
if ( $action =~ /^(?:check|unpack|remove)$/
and $#ARGV == -1
- and not $check_everything
and not $opt{'packages-from-file'}) {
my $ok = 0;
if ($action eq 'check' or $action eq 'unpack') {
@@ -1059,15 +1037,7 @@ while (my $arg = shift) {
}
}
-if ($check_everything) {
- my $t = $pkg_mode;
- my $visitor = sub {
- my ($lpkg) = @_;
- $pool->add_proc($lpkg);
- };
- $t = undef if $pkg_mode eq 'auto';
- $LAB->visit_packages($visitor, $t);
-} elsif ($opt{'packages-from-file'}){
+if ($opt{'packages-from-file'}){
my $fd = open_file_or_fd($opt{'packages-from-file'}, '<');
while (my $file = <$fd>) {
chomp $file;
@@ -1595,9 +1565,7 @@ sub process_group {
sub handle_lab_query {
my ($query) = @_;
- my @res;
- my $type = undef;
- my ($pkg, $version, $arch);
+ my ($type, $pkg, $version, $arch, @res);
my $orig = $query; # Save for the error message later
# "britney"-like format - note this catches the old style, where
@@ -1623,18 +1591,9 @@ sub handle_lab_query {
exit 2;
}
- if (not defined $type and $pkg_mode ne 'auto') {
- # No type specified and "auto" is not the default so we
- # pre-append the default type.
- $query = "$pkg_mode:$query";
- $type = $pkg_mode;
- } else {
- # Type specified or no type and "auto" being the default. In
- # this case we just process the original query.
- $query = $orig;
- }
-
- eval {@res = $LAB->lab_query($query);};
+ # Pass the original query ($query has been mangled for error
+ # checking and debugging purposes)
+ eval {@res = $LAB->lab_query($orig);};
if (my $err = $@) {
$err =~ s/ at .*? line \d+\s*$//;
warning("Bad lab-query: $orig");
@@ -1651,7 +1610,7 @@ sub handle_lab_query {
my $tuple = join(', ', map { $_//'*'} ($type, $pkg, $version, $arch));
debug_msg(
1,
- "Did not find a match for $orig (pkg_mode = $pkg_mode)",
+ "Did not find a match for $orig",
" - Search tuple: ($tuple)"
);
warning(
diff --git a/man/lintian.pod.in b/man/lintian.pod.in
index 39a8527..d6526eb 100644
--- a/man/lintian.pod.in
+++ b/man/lintian.pod.in
@@ -46,11 +46,11 @@ If you specify a I<.changes> file, Lintian will process all packages
listed in that file. This is convenient when checking a new package
before uploading it.
-If you specify packages to be checked or use one of the options
-B<--all> or B<--packages-from-file>, the packages requested will be
-processed. Otherwise, if I<debian/changelog> exists, it is parsed to
-determine the name of the .changes file to look for in the parent
-directory (when using the actions B<--check> or B<--unpack>). See
+If you specify packages to be checked or use the option
+B<--packages-from-file>, the packages requested will be processed.
+Otherwise, if I<debian/changelog> exists, it is parsed to determine
+the name of the .changes file to look for in the parent directory
+(when using the actions B<--check> or B<--unpack>). See
L</CHECKING LAST BUILD> for more information.
@@ -474,6 +474,16 @@ information about the packages it checks. This option overrides the
B<LINTIAN_LAB> environment variable and the configuration file entry
of the same name.
+=item B<--packages-from-file> X
+
+Process the packages listed in X. If the line starts with "!query:",
+then the rest of that line is processed as a lab query (see L</LAB QUERY>).
+
+Otherwise the line is read as the path to a file to process (all
+whitespace is included!).
+
+If X is "-", Lintian will read the packages from STDIN.
+
=item B<--perf-debug>
Enable performance related debug logging.
@@ -538,52 +548,6 @@ two lines of arguments are semantically equivalent:
=back
-Package selection options:
-
-=over 4
-
-=item B<-a>, B<--all>
-
-Check all packages in the laboratory.
-
-Note: If B<--binary>, B<--udeb> or B<--source> is specified, then only
-packages of that type is considered.
-
-=item B<-b>, B<--binary>
-
-The lab-queries listed on the command line are by default binary
-packages.
-
-With B<--all> this means check all binary packages in the lab.
-
-=item B<--packages-from-file> X
-
-Process the packages listed in X. If the line starts with "!query:",
-then the rest of that line is processed as a lab query (see L</LAB QUERY>).
-
-Otherwise the line is read as the path to a file to process (all
-whitespace is included!).
-
-If X is "-", Lintian will read the packages from STDIN.
-
-=item B<-s>, B<--source>
-
-The lab-queries listed on the command line are by default source
-packages.
-
-With B<--all> this means check all source packages in the lab.
-
-The following packages listed on the command line are source packages.
-
-=item B<--udeb>
-
-The lab-queries listed on the command line are by default udeb
-packages.
-
-With B<--all> this means check all udeb packages in the lab.
-
-=back
-
=head1 CHECKS
@CHECKS@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: