display the actual redirect message, as that's informative.
authorespie <espie@openbsd.org>
Fri, 19 Jan 2018 11:34:41 +0000 (11:34 +0000)
committerespie <espie@openbsd.org>
Fri, 19 Jan 2018 11:34:41 +0000 (11:34 +0000)
won't flood the terminal, since the first redirect changes the host
discussed with sthen

usr.sbin/pkg_add/OpenBSD/PackageRepository.pm

index 02e24ad..6c380e3 100644 (file)
@@ -1,5 +1,5 @@
 # ex:ts=8 sw=4:
-# $OpenBSD: PackageRepository.pm,v 1.149 2018/01/17 13:25:36 espie Exp $
+# $OpenBSD: PackageRepository.pm,v 1.150 2018/01/19 11:34:41 espie Exp $
 #
 # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
 #
@@ -294,6 +294,7 @@ sub parse_problems
        $self->{last_error} = 0;
        while(<$fh>) {
                if (m/^Redirected to https?\:\/\/([^\/]*)/) {
+                       $self->{state}->say("#1", $_);
                        $self->{host} = $1;
                        $baseurl = $self->url;
                        next;