From 11efedddc5d3869053633d321f4191d52e96ba1e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 12 May 2009 17:58:39 +0000 Subject: (really_prepare_add_restricted,mdkapplet-restricted-helper) do not hardcode '2009.0' version, thus fixing adding 2009.1 restricted media on 2009.1 (#50478) --- mdkapplet-restricted-helper | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mdkapplet-restricted-helper') 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 \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"); } -- cgit v1.2.1