summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/apt-why10
1 files changed, 2 insertions, 8 deletions
diff --git a/bin/apt-why b/bin/apt-why
index f5c2093..893fd6f 100755
--- a/bin/apt-why
+++ b/bin/apt-why
@@ -11,22 +11,16 @@ use Getopt::Long;
my $cache = AptPkg::Cache->new;
my $max_depth = 5;
my $all = 0;
-my @deptypes;
-my @default_deptypes = ('Depends', 'Recommends', 'Suggests');
+my @deptypes = ('Depends', 'Recommends', 'Suggests');
GetOptions(
'all!' => \$all,
- 'deptype=s' => \@deptypes,
+ 'deptype=s' => sub {shift; @deptypes = split(/,/, shift)},
'depth=i' => \$max_depth,
'h|?|help' => \&usage,
);
my $packagename = shift or die("No packagename given");
my @known;
-@deptypes = split(/,/, join(',', @deptypes));
-unless (@deptypes) {
- @deptypes = @default_deptypes;
-}
-
sub usage {
exec('perldoc', '-F', $0) or die("See perldoc -F $0");
}