From d4cd5999ff27f5b00208cc39446ab07ddceefaeb Mon Sep 17 00:00:00 2001 From: SoonKyu Park Date: Wed, 15 Jun 2016 14:18:44 +0900 Subject: update to upstream 20150115 Change-Id: I8943d5a8c98049843e6753c38beac89927690d72 --- download | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'download') 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') { -- cgit v1.2.3