From 58ae3ca5c086d75fed01e1c6bec7d522590d4a96 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Thu, 6 Feb 2014 22:58:27 +0000 Subject: http 404 is definitive, so treat it like 550 ftp. --- usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index c6aaf602418..9cf4da65632 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.105 2014/02/02 23:09:56 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.106 2014/02/06 22:58:26 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -598,7 +598,8 @@ sub try_until_success if (defined $o) { return $o; } - if (defined $self->{lasterror} && $self->{lasterror} == 550) { + if (defined $self->{lasterror} && + ($self->{lasterror} == 550 || $self->{lasterror} == 404)) { last; } if ($self->should_have($pkgname)) { @@ -670,6 +671,10 @@ sub parse_problems m/^ftp: Can't connect or login to host/o) { $self->{lasterror} = 421; } + # http error + if (m/^ftp: Error retrieving file: 404/o) { + $self->{lasterror} = 404; + } if (m/^550\s+/o) { $self->{lasterror} = 550; } -- cgit v1.2.3