In gmane.os.openbsd.misc, Siju George wrote: > I have this in my PKG_PATH variable > > $ echo $PKG_PATH > ftp://ftp.openbsd.org/pub/OpenBSD/4.4/packages/i386/ > $ > > When I try to update a package it shows an error > > $ sudo pkg_add -ui firefox3 > Error from ftp://ftp.openbsd.org//pub/OpenBSD/4.4/packages/i386/: > ftp: connect: Connection refused > ftp: Can't connect or login to host `ftp.openbsd.org' ... > > I noticed in the line > > Error from ftp://ftp.openbsd.org//pub/OpenBSD/4.4/packages/i386/: > > there are two forward slashes after the "ftp.openbsd.org" part. > > Is that what is causing the trouble? > How do I solve this?
This diff removes the extra / and hasn't broken anything yet in my testing (add/update with ftp and http): Index: PackageRepository.pm =================================================================== RCS file: /data/cvsroot/open/anoncvs/cvs/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm,v retrieving revision 1.62 diff -u -p -r1.62 PackageRepository.pm --- PackageRepository.pm 2 Feb 2009 20:41:47 -0000 1.62 +++ PackageRepository.pm 3 Feb 2009 10:54:24 -0000 @@ -394,7 +394,7 @@ sub baseurl { my $self = shift; - return "//$self->{host}/$self->{path}"; + return "//$self->{host}$self->{path}"; } sub parse_url