From 7de5cfed56d90c28dacb4243b078c67fcee9ec01 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sat, 9 Jan 2010 09:45:41 +0000 Subject: move pipe handling into RepositoryList --- usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm') diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepositoryList.pm index 668f7ed0592..db2292eefcd 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.18 2010/01/09 09:37:45 espie Exp $ +# $OpenBSD: PackageRepositoryList.pm,v 1.19 2010/01/09 09:45:40 espie Exp $ # # Copyright (c) 2003-2006 Marc Espie # @@ -36,6 +36,9 @@ sub find { my ($self, $pkgname, $arch) = @_; + if ($pkgname eq '-') { + return OpenBSD::PackageRepository::Local::Pipe->new->find($pkgname, $arch); + } for my $repo (@$self) { my $pkg = $repo->find($pkgname, $arch); return $pkg if defined $pkg; @@ -47,6 +50,10 @@ sub grabPlist { my ($self, $pkgname, $arch, $code) = @_; + if ($pkgname eq '-') { + return OpenBSD::PackageRepository::Local::Pipe->new->grabPlist($pkgname, $arch, $code); + } + for my $repo (@$self) { my $plist = $repo->grabPlist($pkgname, $arch, $code); return $plist if defined $plist; -- cgit v1.2.3