From cdd531aa092822eb80a57344a305b67d51ef2887 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 6 Feb 2018 16:29:01 +0000 Subject: [PATCH] syslog cdns redirect, as suggested by sthen@ --- usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index 615ea8b0124..e97d6ad22d4 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.151 2018/01/20 12:01:56 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.152 2018/02/06 16:29:01 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -295,7 +295,10 @@ sub parse_problems while(<$fh>) { if (m/^Redirected to https?\:\/\/([^\/]*)/) { $self->{state}->print("#1", $_); - $self->{host} = $1; + my $newhost = $1; + $self->{state}->syslog("Redirected from #1 to #2", + $self->{host}, $newhost); + $self->{host} = $newhost; $baseurl = $self->url; next; } -- 2.20.1