diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2006-03-13 16:08:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2006-03-13 16:08:13 +0000 |
commit | 22843c8beab59dde8d91d8037eb7cf42fa529b67 (patch) | |
tree | e723c6caf49e3c736d170690bc3537459e86805b /usr.sbin/pkg_add/OpenBSD/PackageRepository | |
parent | 718b68a6c38d41688053233a80037eaa6a2c030c (diff) |
clean-up some name handling:
- package locations always contain a pkgname (except if we don't have it)
- complete it on the repository side to grab the right file.
- no need to pass pkgname/arch on $location->grabPlist(), since it's
already in the location.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageRepository')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm index 68b37e2f3e7..dd2864891b7 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SCP.pm,v 1.7 2006/03/08 12:10:48 espie Exp $ +# $OpenBSD: SCP.pm,v 1.8 2006/03/13 16:08:12 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -54,7 +54,6 @@ sub may_exist { my ($self, $name) = @_; my $l = $self->list(); - $name =~ s/\.tgz$//; return grep {$_ eq $name } @$l; } @@ -70,7 +69,7 @@ sub grab_object while (<$getfh>) { last if m/^ABORTED/; } - print $cmdfh "GET ", $self->{path}.$object->{name}, "\n"; + print $cmdfh "GET ", $self->{path}.$object->{name}.".tgz", "\n"; close($cmdfh); $_ = <$getfh>; chomp; |