diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-03 20:54:06 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-03 20:54:06 +0200 |
commit | cbecbfb8dbb8bcd4c08b2d48a6384db661bf4676 (patch) | |
tree | 5ed5d8bf297d26e06b92455811d6cbb76b1e13da | |
parent | c2973ead93871b63a896c5282922e3454ff1e338 (diff) |
apt-why: Print error message if the package does not exist
-rwxr-xr-x | bin/apt-why | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/apt-why b/bin/apt-why index 171bba0..e6c5de6 100755 --- a/bin/apt-why +++ b/bin/apt-why @@ -50,6 +50,11 @@ sub recurse { recurse($_, $depth) foreach revdeps($name); } +unless ($cache->{$packagename}) { + print STDERR "No such package: $packagename\n"; + exit(1); +} + if ($cache->{$packagename}->{Flags} =~ /Essential/) { print "Essential: Yes\n"; } |