summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-07-11 20:37:00 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2008-07-11 20:37:00 +0200
commit92f68b4144c8bb044f6e70a350a69bfa17180cc7 (patch)
tree3c242af695c0cf59b6b97c79d6474525759ea666 /bin
parent7808688de0508ddb53c2736bf2fb44eafdca9ef9 (diff)
Renamed apt-perl to apt-why
Diffstat (limited to 'bin')
-rwxr-xr-xbin/apt-why (renamed from bin/apt-perl)12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/apt-perl b/bin/apt-why
index 60ca0f7..b9df057 100755
--- a/bin/apt-perl
+++ b/bin/apt-why
@@ -5,8 +5,8 @@ use AptPkg::Cache;
use Switch;
my $cache = AptPkg::Cache->new;
-my $query = shift or die("No action given");
-my $packagename = shift or die("No packagename given");
+my $packagename = pop or dir("No packagename given");
+my $query = shift || '';
my $package = $cache->{$packagename};
unless($package) {
@@ -100,12 +100,10 @@ sub print_deps {
}
}
-if ($query eq 'why') {
- print_deps(why($package->{RevDependsList}));
-} elsif ($query eq 'why-not') {
+if ($query eq 'not') {
print_deps(why_not($package->{RevDependsList}));
-} elsif ($query eq 'rdeps') {
- print_deps(revdeps($package->{RevDependsList}));
+} else {
+ print_deps(why($package->{RevDependsList}));
}
__END__