diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-05-12 17:58:39 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-05-12 17:58:39 +0000 |
commit | 11efedddc5d3869053633d321f4191d52e96ba1e (patch) | |
tree | ec9a8ce080905ad6ea01c07b3f6cc397d18a6e60 | |
parent | bf297f60b4fccddd82f8550cfa086cbfe64d2930 (diff) | |
download | mgaonline-11efedddc5d3869053633d321f4191d52e96ba1e.tar mgaonline-11efedddc5d3869053633d321f4191d52e96ba1e.tar.gz mgaonline-11efedddc5d3869053633d321f4191d52e96ba1e.tar.bz2 mgaonline-11efedddc5d3869053633d321f4191d52e96ba1e.tar.xz mgaonline-11efedddc5d3869053633d321f4191d52e96ba1e.zip |
(really_prepare_add_restricted,mdkapplet-restricted-helper) do not
hardcode '2009.0' version, thus fixing adding 2009.1 restricted media
on 2009.1 (#50478)
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | mdkapplet | 2 | ||||
-rwxr-xr-x | mdkapplet-restricted-helper | 6 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,6 @@ +- mdkapplet + o add 2009.1 restricted media on 2009.1 (#50478) + Version 2.77 - 17 April 2009, Thierry Vignaud - mdkapplet @@ -724,7 +724,7 @@ sub is_restricted_media_configured { } sub really_prepare_add_restricted() { - $mdv_update_pid = run_program::raw({ detach => 1 }, 'mdkapplet-restricted-helper'); + $mdv_update_pid = run_program::raw({ detach => 1 }, 'mdkapplet-restricted-helper', $product_id->{version}); } sub prepare_add_restricted() { diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper index c1d8a43d..b98791b7 100755 --- a/mdkapplet-restricted-helper +++ b/mdkapplet-restricted-helper @@ -42,11 +42,15 @@ use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Request; +my $version; foreach my $opt (@ARGV) { if ($opt =~ /--(rpm-root|urpmi-root)=(.*)/) { $::rpmdrake_options{$1}[0] = $2; + } else { + $version = $opt; } } +$version or die "usage: mdkapplet-restricted-helper <distrib_version>\n"; get_restricted_authentication(); @@ -167,7 +171,7 @@ sub adding_media_failed { sub actually_add_restricted_medium { my ($ref, $password, $arch) = @_; my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always'); - my $uri = "https://" . uri_escape($ref->{data}{email}) . ":$password\@dl.mandriva.com/rpm/comm/2009.0/"; + my $uri = "https://" . uri_escape($ref->{data}{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"); } |