diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-09-13 10:44:07 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-09-13 10:44:07 +0000 |
commit | 9f7a761da34f11b13cabc604aeef3eb6b708481f (patch) | |
tree | 90ecfcbf86aec1b213d8509908cd7e34eaf83f7b /usr.sbin/pkg_add | |
parent | 9f52d9448ee11e2861ca920558793a16f970c9b7 (diff) |
don't actively avoid the Composite Pattern.
PackageRepositoryList can handle very close to PackageRepository
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index a31de391d85..e13f179888b 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.25 2005/09/13 10:25:33 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.26 2005/09/13 10:44:06 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -563,7 +563,7 @@ sub add } } -sub find +sub openPackage { my ($self, $pkgname, $arch) = @_; @@ -574,7 +574,7 @@ sub find return undef; } -sub available +sub list { my $self = shift; @@ -637,7 +637,7 @@ sub find $pkgpath->add($repository); } } else { - $package = $pkgpath->find($_, $arch); + $package = $pkgpath->openPackage($_, $arch); } $packages{$_} = $package if defined($package); return $package; @@ -645,7 +645,7 @@ sub find sub available { - return $pkgpath->available(); + return $pkgpath->list(); } 1; |