diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-16 09:35:16 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-16 09:35:16 +0000 |
commit | 97108074ff1f1bdba5be192087d44082bdc95c4b (patch) | |
tree | 75de1509daa2089f40ac623ce45cc83aa258f7b2 /usr.sbin/pkg_add/OpenBSD | |
parent | f9faf99f5d21289bd797c1754adbba2775de89b3 (diff) |
fix a few minor details: _list() needs to be called as a method.
use nlist *.tgz instead of ls to gain speed. http does not need
any command, it just retrieves the directory index.
(code not used yet, but so blatantly incorrect)
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index 9c224e6efd6..68cf1f5557b 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.14 2005/06/26 16:41:08 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.15 2005/08/16 09:35:15 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -121,7 +121,7 @@ sub list my ($self) = @_; my $host = $self->{host}; my $path = $self->{path}; - return _list("ssh $host ls -l $path"); + return $self->_list("ssh $host ls -l $path"); } package OpenBSD::PackageLocation::Local; @@ -235,7 +235,7 @@ sub list my $fullname = $self->{location}; my @l =(); local $_; - open(my $fh, '-|', "echo ls|ftp -o - $fullname 2>/dev/null") or return undef; + open(my $fh, '-|', "ftp -o - $fullname 2>/dev/null") or return undef; # XXX assumes a pkg HREF won't cross a line. Is this the case ? while(<$fh>) { chomp; @@ -255,7 +255,7 @@ sub list { my ($self) = @_; my $fullname = $self->{location}; - return _list("echo ls|ftp -o - $fullname 2>/dev/null"); + return $self->_list("echo nlist *.tgz|ftp -o - $fullname 2>/dev/null"); } |