summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet-enterprise-update-helper2
-rwxr-xr-xmdkapplet-extended-maintenance-helper2
-rwxr-xr-xmdkapplet-restricted-helper2
-rw-r--r--mdkonline.pm5
4 files changed, 8 insertions, 3 deletions
diff --git a/mdkapplet-enterprise-update-helper b/mdkapplet-enterprise-update-helper
index dddfad29..31550d36 100755
--- a/mdkapplet-enterprise-update-helper
+++ b/mdkapplet-enterprise-update-helper
@@ -162,7 +162,7 @@ sub adding_media_failed {
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 @options = get_urpmi_options();
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 44eb16d9..38aa7ba4 100755
--- a/mdkapplet-extended-maintenance-helper
+++ b/mdkapplet-extended-maintenance-helper
@@ -199,7 +199,7 @@ sub adding_media_failed {
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 @options = (get_urpmi_options(), '--update');
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 06eacde2..ad1bce59 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -168,7 +168,7 @@ sub adding_media_failed {
sub actually_add_restricted_medium {
my ($ref, $password, $arch) = @_;
$password = uri_escape($password);
- my @options = ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always');
+ my @options = get_urpmi_options();
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;
diff --git a/mdkonline.pm b/mdkonline.pm
index eee95bd7..dec9f9d1 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -39,6 +39,7 @@ our @EXPORT = qw(find_current_distro
get_product_id
get_release
get_stale_upgrade_filename
+ get_urpmi_options
is_it_2008_0
is_enterprise_media_supported
is_restricted_media_supported
@@ -170,6 +171,10 @@ sub get_banner {
Gtk2::Banner->new(get_banner_icon(), $o_title || N("Distribution Upgrade"));
}
+sub get_urpmi_options() {
+ ({ sensitive_arguments => 1 }, 'urpmi.addmedia', '--xml-info', 'always');
+}
+
sub is_running {
my ($name) = @_;
my $found;