From 28f5b69870ab89a0f3aa13b8276adededbf1535c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 27 Jan 2010 14:59:55 +0000 Subject: (actually_add_enterprise_update_medium,actually_add_extmaint_medium,actually_add_restricted_medium) simplify --- mdkapplet-enterprise-update-helper | 3 ++- mdkapplet-extended-maintenance-helper | 3 ++- 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"); } -- cgit v1.2.1