summaryrefslogtreecommitdiff
path: root/download
diff options
context:
space:
mode:
authorSoonKyu Park <sk7.park@samsung.com>2016-06-15 14:18:44 +0900
committerSoonKyu Park <sk7.park@samsung.com>2016-06-15 14:18:44 +0900
commitd4cd5999ff27f5b00208cc39446ab07ddceefaeb (patch)
tree66b90e83d8352eac4569271f7ca03de5e3977e50 /download
parent43a15ec55888f27e1377df0066898fd079510a9c (diff)
downloadbuild-d4cd5999ff27f5b00208cc39446ab07ddceefaeb.tar.gz
build-d4cd5999ff27f5b00208cc39446ab07ddceefaeb.tar.bz2
build-d4cd5999ff27f5b00208cc39446ab07ddceefaeb.zip
update to upstream 20150115
Change-Id: I8943d5a8c98049843e6753c38beac89927690d72
Diffstat (limited to 'download')
-rwxr-xr-xdownload24
1 files changed, 22 insertions, 2 deletions
diff --git a/download b/download
index 4314617..ac6e9f4 100755
--- a/download
+++ b/download
@@ -1,5 +1,25 @@
#!/usr/bin/perl -w
+################################################################
+#
+# Copyright (c) 1995-2014 SUSE Linux Products GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or 3 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file COPYING); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
use Net::SSL ();
BEGIN {
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0,
@@ -31,11 +51,11 @@ for my $url (@ARGV) {
my $original = $url;
if ($url =~ /^zypp:\/\/([^\/]*)\/?/) {
use Build::Zypp;
- my $repo = Build::Zypp::parsecfg($1);
+ my $repo = Build::Zypp::parserepo($1);
die "can't parse $1\n" unless $repo;
die "missing url in repo ".$repo->{'name'}."\n" unless exists $repo->{'baseurl'};
my $u = $repo->{'baseurl'};
- $u .= '/' unless substr($u, -1, 1) eq '/';
+ $u .= '/' unless $u =~ /\/$/;
$url =~ s/^zypp:\/\/[^\/]*\/*//;
$url = URI->new($u.$url);
if ($url->scheme eq 'dir') {