summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2008-05-26 17:38:55 +0000
committerMarc Espie <espie@cvs.openbsd.org>2008-05-26 17:38:55 +0000
commit54b6ea90d23bfd6581cb3e5a7a674863920d777f (patch)
tree7a64c6bb743f75d7fa7b3a79fe3ce280aeb19614 /usr.sbin/pkg_add
parent70fa9a69d47138b95b41ec83dd1c020986ec9371 (diff)
remove nlist bandwidth optimization, since ftp servers actually don't cope
with *.tgz very well... Fix regexp for stripping out ftp responses (as noticed by bernd)
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index 8f5e42da344..e489af2f42d 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageRepository.pm,v 1.52 2008/05/16 18:31:47 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.53 2008/05/26 17:38:54 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -645,8 +645,8 @@ sub _list
open(my $fh, '-|', "$cmd") or return;
while(<$fh>) {
chomp;
- next if m/^d.*\s+\S/;
- next unless m/([^\s]+)\.tgz\s*$/;
+ next if m/^\d\d\d\s+\S/;
+ next unless m/(\S+)\.tgz\s*$/;
push(@$l, $1);
}
close($fh);
@@ -658,7 +658,7 @@ sub get_ftp_list
my ($self, $error) = @_;
my $fullname = $self->url;
- return $self->_list("echo 'nlist *.tgz'| ".OpenBSD::Paths->ftp
+ return $self->_list("echo 'nlist'| ".OpenBSD::Paths->ftp
." $fullname 2>$error");
}