summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-10-15 18:32:12 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-10-15 18:32:12 +0000
commita8f4e0494367215058071983f9e4877eb47bfd8a (patch)
treedd7fe2c83689dbb5cce1a042bed1caf1ae5f5c41 /usr.sbin/pkg_add/OpenBSD
parent28304259ca5315041425156cfcf7aea48374aee8 (diff)
move the installed check in Tracker, where they belong
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Tracker.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Tracker.pm b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
index ebfc6c5b544..c4563356bda 100644
--- a/usr.sbin/pkg_add/OpenBSD/Tracker.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Tracker.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Tracker.pm,v 1.1 2009/10/15 18:17:18 espie Exp $
+# $OpenBSD: Tracker.pm,v 1.2 2009/10/15 18:32:11 espie Exp $
#
# Copyright (c) 2009 Marc Espie <espie@openbsd.org>
#
@@ -62,4 +62,16 @@ sub mark_installed
}
}
+sub is_installed
+{
+ my ($self, $pkg) = @_;
+ return $self->{installed}->{$pkg};
+}
+
+sub installed
+{
+ my $self = shift;
+ return keys %{$self->{installed}};
+}
+
1;