diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-17 17:25:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-08-17 17:25:19 +0200 |
commit | 1002e0a2ec4e29445c574cbf3de837ae98192014 (patch) | |
tree | e73b8f2d749d66aed9c3429f20e72bcfc03bb3a7 /bin/apt-why | |
parent | c870dfa0a5f4e9ba138bc72900130af069c22802 (diff) |
bin/apt-why: Made 'not' a longoption
Diffstat (limited to 'bin/apt-why')
-rwxr-xr-x | bin/apt-why | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bin/apt-why b/bin/apt-why index 97af4b9..ed1e0a2 100755 --- a/bin/apt-why +++ b/bin/apt-why @@ -3,10 +3,14 @@ use strict; use warnings; use AptPkg::Cache; use Switch; +use Getopt::Long; my $cache = AptPkg::Cache->new; -my $packagename = pop or die("No packagename given"); -my $query = shift || ''; +my $not = 0; +GetOptions( + "not" => \$not, +); +my $packagename = shift or die("No packagename given"); my $package = $cache->{$packagename}; unless($package) { @@ -100,7 +104,7 @@ sub print_deps { } } -if ($query eq 'not') { +if ($not) { print_deps(why_not($package->{RevDependsList})); } else { print_deps(why($package->{RevDependsList})); @@ -131,3 +135,11 @@ An empty field means not installed. If B<not> is specified, reverse dependencies prohibiting the install of I<package> are shown. Else, reverse dependencies justifying the install of I<package> are shown + +=head1 AUTHOR + +Daniel Friesel <derf@derf.homelinux.org> + +=head1 LICENSE + + 0. You just DO WHAT THE FUCK YOU WANT TO. |