diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-03-08 19:56:25 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-03-08 19:56:25 +0000 |
commit | a0f7ac72d6be86049e90113c9c2af296b0ea91d4 (patch) | |
tree | 32fb891e9c993e8c857364a38e9b43d27b43d534 | |
parent | 131b608016f7d04d3486e06da3b7144fed1fec5b (diff) | |
download | mgaonline-a0f7ac72d6be86049e90113c9c2af296b0ea91d4.tar mgaonline-a0f7ac72d6be86049e90113c9c2af296b0ea91d4.tar.gz mgaonline-a0f7ac72d6be86049e90113c9c2af296b0ea91d4.tar.bz2 mgaonline-a0f7ac72d6be86049e90113c9c2af296b0ea91d4.tar.xz mgaonline-a0f7ac72d6be86049e90113c9c2af296b0ea91d4.zip |
handle new SOAP interface with the MdvOnline server
-rwxr-xr-x | mdkupdate | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -159,7 +159,21 @@ You need to update to a newer version. You can get a new one from http://start.m my @bundles; my $w = $in->wait_message(N("Please wait"), N("Preparing...")); my ($mirrors, $bundle) = ($bundle_info->{data}{mirrors}, $bundle_info->{data}{bundle}); - my %mirrors = map { split(';', $_, 2) } @$mirrors; + foreach my $mirror (@$mirrors) { + next if $mirror->{mode} eq 'anon'; # nothing to do + if ($mirror->{mode} eq 'auth') { + # add "user:pass@" substring if needed: + # user password & login provided by server on those provided with the bundle: + $bundle_vars{PASS} = "dfgdfg"; # FIXME + $bundle_vars{USER} = $mirror->{user} if $mirror->{user}; + $bundle_vars{PASS} = $mirror->{pass} if $mirror->{pass}; + $mirror->{url} =~ s!^([^:]*)://!\1://${bundle_vars{USER}}:${bundle_vars{PASS}}@!; + } else { # unknown method, aborting + $in->ask_warn(N("Error"), N("This bundle is not well formated. Aborting.")); + $in->exit(1); + } + } + my %mirrors = map { $_->{name} => join('@', grep { $_ } $_->{auth}, $_->{url}) } @$mirrors; add_media($_, $mirrors{$_}, 'media_info/synthesis.hdlist.cz', '') foreach keys %mirrors; $bundle =~ s/-[^-]*-[^-]*\.[^.]*\.rpm$//; push @bundles, $bundle; |