diff options
author | Zhang Qiang <qiang.z.zhang@intel.com> | 2012-08-11 07:55:40 +0800 |
---|---|---|
committer | Adrian Schröter <adrian@suse.de> | 2012-09-27 15:38:14 +0200 |
commit | 012f523ac7c8fe3139e4f5db120c50578c603c0e (patch) | |
tree | 8e294ae50ffae24cf1787c0ac1b8eaf3ac42fa8c | |
parent | 4afd9f0ee03f9e51cf8db9a27fae4663e3f4dde6 (diff) | |
download | obs-build-012f523ac7c8fe3139e4f5db120c50578c603c0e.tar.gz obs-build-012f523ac7c8fe3139e4f5db120c50578c603c0e.tar.bz2 obs-build-012f523ac7c8fe3139e4f5db120c50578c603c0e.zip |
https repo support
some distro repo using https now, such as Tizen/Meego, so https need
support now.
-rwxr-xr-x | download | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,8 @@ #!/usr/bin/perl -w +use Net::SSL (); BEGIN { + $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0, unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build'); } @@ -17,7 +19,6 @@ my $dir = shift @ARGV; my $ua = LWP::UserAgent->new( agent => "openSUSE build script", - env_proxy => 1, timeout => 42); for my $url (@ARGV) { @@ -33,6 +34,7 @@ for my $url (@ARGV) { } else { $url = URI->new($url); } + $ua->env_proxy if $url->scheme ne 'https'; my $dest = "$dir/".basename($url->path); unlink($dest); # just in case my $retry = 3; |