diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-01-27 14:59:55 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-01-27 14:59:55 +0000 |
commit | 28f5b69870ab89a0f3aa13b8276adededbf1535c (patch) | |
tree | 2069dbc704f1469ae896c5e12f62263511a561f5 | |
parent | d63ddd0671d45fbaf80da5952b35644f2b080f58 (diff) | |
download | mgaonline-28f5b69870ab89a0f3aa13b8276adededbf1535c.tar mgaonline-28f5b69870ab89a0f3aa13b8276adededbf1535c.tar.gz mgaonline-28f5b69870ab89a0f3aa13b8276adededbf1535c.tar.bz2 mgaonline-28f5b69870ab89a0f3aa13b8276adededbf1535c.tar.xz mgaonline-28f5b69870ab89a0f3aa13b8276adededbf1535c.zip |
(actually_add_enterprise_update_medium,actually_add_extmaint_medium,actually_add_restricted_medium)
simplify
-rwxr-xr-x | mdkapplet-enterprise-update-helper | 3 | ||||
-rwxr-xr-x | mdkapplet-extended-maintenance-helper | 3 | ||||
-rwxr-xr-x | mdkapplet-restricted-helper | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/mdkapplet-enterprise-update-helper b/mdkapplet-enterprise-update-helper index bddede6d..dddfad29 100755 --- a/mdkapplet-enterprise-update-helper +++ b/mdkapplet-enterprise-update-helper @@ -163,6 +163,7 @@ sub actually_add_enterprise_update_medium { my ($ref, $password, $arch) = @_; $password = uri_escape($password); my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always'); - my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@download.mandriva.com/$version/rpms/$arch/"; + my $email = uri_escape($ref->{data}{email}); + my $uri = "https://$email:$password\@download.mandriva.com/$version/rpms/$arch/"; run_program::raw(@options, '--update', '--distrib', $uri); } diff --git a/mdkapplet-extended-maintenance-helper b/mdkapplet-extended-maintenance-helper index 73d6a84a..fdbd3d4c 100755 --- a/mdkapplet-extended-maintenance-helper +++ b/mdkapplet-extended-maintenance-helper @@ -193,6 +193,7 @@ sub actually_add_extmaint_medium { my ($ref, $password, $arch) = @_; $password = uri_escape($password); my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always', '--update'); - my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@dl.mandriva.com/extended/$version/$arch"; + my $email = uri_escape($ref->{data}{email}); + my $uri = "https://$email:$password\@dl.mandriva.com/extended/$version/$arch"; run_program::raw(@options, "Extanded Maintenance $arch " . int(rand(100000)), ${uri}); } diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper index 0883474f..06eacde2 100755 --- a/mdkapplet-restricted-helper +++ b/mdkapplet-restricted-helper @@ -169,7 +169,8 @@ sub actually_add_restricted_medium { my ($ref, $password, $arch) = @_; $password = uri_escape($password); my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always'); - my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@dl.mandriva.com/rpm/comm/$version/"; + my $email = uri_escape($ref->{data}{email}); + my $uri = "https://$email:$password\@dl.mandriva.com/rpm/comm/$version/"; run_program::raw(@options, "Restricted $arch " . int(rand(100000)), "$uri$arch") or return 0; run_program::raw(@options, '--update', "Restricted Updates $arch " . int(rand(100000)), "${uri}updates/$arch"); } |