summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-03 15:16:51 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-03 15:16:51 +0000
commit2c34f05b496d35d9a1de3f8ba0658c6511edf348 (patch)
tree12837b11dd2f74f3d049b8d4752340608a5bf333
parent05128baa3e50ee1eb8e00f56e078ec4e4dac6a6e (diff)
downloadmgaonline-2c34f05b496d35d9a1de3f8ba0658c6511edf348.tar
mgaonline-2c34f05b496d35d9a1de3f8ba0658c6511edf348.tar.gz
mgaonline-2c34f05b496d35d9a1de3f8ba0658c6511edf348.tar.bz2
mgaonline-2c34f05b496d35d9a1de3f8ba0658c6511edf348.tar.xz
mgaonline-2c34f05b496d35d9a1de3f8ba0658c6511edf348.zip
(actually_add_restricted_medium) split it out of
add_restricted_medium() (needed for next commit)
-rwxr-xr-xmdkapplet-restricted-helper13
1 files changed, 9 insertions, 4 deletions
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index 2129d44a..d034e1f4 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -119,10 +119,15 @@ sub add_restricted_medium {
$in->ask_warn(N("Error"), N("An error occurred") . "\n" . $ref->{message});
goto &get_restricted_authentication;
} else {
- my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia');
- my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@dl.mandriva.com/rpm/comm/2009.0/";
my $arch = urpm::cfg::get_arch();
- run_program::raw(@options, 'Restricted ' . int(rand(100000)), "$uri$arch");
- run_program::raw(@options, '--update', 'Restricted Updates ' . int(rand(100000)), "${uri}updates/$arch");
+ actually_add_restricted_medium($ref, $password, $arch);
}
}
+
+sub actually_add_restricted_medium {
+ my ($ref, $password, $arch) = @_;
+ my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia');
+ my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@dl.mandriva.com/rpm/comm/2009.0/";
+ run_program::raw(@options, 'Restricted ' . int(rand(100000)), "$uri$arch");
+ run_program::raw(@options, '--update', 'Restricted Updates ' . int(rand(100000)), "${uri}updates/$arch");
+}