summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-02-06 22:58:27 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-02-06 22:58:27 +0000
commit58ae3ca5c086d75fed01e1c6bec7d522590d4a96 (patch)
treecfa4ff5e4aa09585a4d55ec23d7890e41cede144 /usr.sbin
parent57d1db3bccc2c19b0f5a708c34c132d2183bd3d2 (diff)
http 404 is definitive, so treat it like 550 ftp.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm9
1 files changed, 7 insertions, 2 deletions
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 <espie@openbsd.org>
#
@@ -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;
}