summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-03 20:54:06 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-03 20:54:06 +0200
commitcbecbfb8dbb8bcd4c08b2d48a6384db661bf4676 (patch)
tree5ed5d8bf297d26e06b92455811d6cbb76b1e13da
parentc2973ead93871b63a896c5282922e3454ff1e338 (diff)
apt-why: Print error message if the package does not exist
-rwxr-xr-xbin/apt-why5
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";
}