diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-05-14 12:52:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-05-14 12:52:54 +0000 |
commit | 48cb5b7dc873b4f7cb23d955eb3f73d9f97b0471 (patch) | |
tree | c3e69833ece7718106da5a9978d68864fb032dc7 | |
parent | 10abfd6d8d99ccc037e333b369547e4c39524766 (diff) |
kill "available" routine, which is no longer used.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 7 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm | 23 |
2 files changed, 3 insertions, 27 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index 4e2e87af73d..18be065e6c2 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocator.pm,v 1.68 2007/05/13 17:00:02 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.69 2007/05/14 12:52:53 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -80,11 +80,6 @@ sub find return $package; } -sub available -{ - return $pkgpath->available(); -} - sub grabPlist { my $class = shift; diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm index 32b8fa03d9d..91973257aad 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepositoryList.pm,v 1.13 2007/05/14 12:49:27 espie Exp $ +# $OpenBSD: PackageRepositoryList.pm,v 1.14 2007/05/14 12:52:53 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie <espie@openbsd.org> # @@ -23,16 +23,13 @@ package OpenBSD::PackageRepositoryList; sub new { my $class = shift; - return bless {list => [], avail => undef }, $class; + return bless {list => [] }, $class; } sub add { my $self = shift; push @{$self->{list}}, @_; - if (@_ > 0) { - $self->{avail} = undef; - } } sub find @@ -57,22 +54,6 @@ sub grabPlist return; } -sub available -{ - my $self = shift; - - if (!defined $self->{avail}) { - my $available_packages = {}; - foreach my $loc (reverse @{$self->{list}}) { - foreach my $pkg (@{$loc->list}) { - $available_packages->{$pkg} = $loc; - } - } - $self->{avail} = $available_packages; - } - return keys %{$self->{avail}}; -} - sub match { my ($self, @search) = @_; |