summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Qiang <qiang.z.zhang@intel.com>2012-08-11 07:55:40 +0800
committerAdrian Schröter <adrian@suse.de>2012-09-27 15:38:14 +0200
commit012f523ac7c8fe3139e4f5db120c50578c603c0e (patch)
tree8e294ae50ffae24cf1787c0ac1b8eaf3ac42fa8c
parent4afd9f0ee03f9e51cf8db9a27fae4663e3f4dde6 (diff)
downloadobs-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-xdownload4
1 files changed, 3 insertions, 1 deletions
diff --git a/download b/download
index 8b75ebf..93ed595 100755
--- a/download
+++ b/download
@@ -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;