summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2008-06-13 15:19:07 +0000
committerMarc Espie <espie@cvs.openbsd.org>2008-06-13 15:19:07 +0000
commitfef0fa8e7601ec0bf1ecd1dadc42361c6abc7b1e (patch)
tree9dccd373ec58b03563747d910103766967539cff
parent1fd678535740597795269b8edc1472a526e78940 (diff)
550 is fatal, don't bother retrying.
Problem found by Martynas Venckus, fix by me.
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageRepository.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm
index e489af2f42d..7eb9c1d624e 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.53 2008/05/26 17:38:54 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.54 2008/06/13 15:19:06 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -498,6 +498,9 @@ sub try_until_success
if (defined $o) {
return $o;
}
+ if (defined $self->{lasterror} && $self->{lasterror} == 550) {
+ last;
+ }
if ($self->should_have($pkgname)) {
print STDERR "Temporary error, sleeping $retry seconds\n";
sleep($retry);