From 260f7a866e5949c77309727c978ad12adc26d420 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 3 Jan 2006 16:25:35 +0000 Subject: use wizards::check_rpm --- drakwizard.pl | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/drakwizard.pl b/drakwizard.pl index 049cfcb4..52bbf5f5 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -22,6 +22,7 @@ use lib qw(/usr/lib/libDrakX); use strict; +use wizards; use standalone; use interactive; @@ -90,7 +91,6 @@ if ($err) { $::in = $in; if ($wiz->{o}{use_new_data_structure}) { - require wizards; my $wizard = wizards->new($wiz->{o}); $wizard->safe_process($in); } else { @@ -106,7 +106,7 @@ sub wizard { if ($> && !$o->{allow_user} && !$::testing) { require_root_capability(); } - check_rpm_local($o->{needed_rpm}) if $o->{needed_rpm} && !$::testing; + wizards::check_rpm($o->{needed_rpm}) if $o->{needed_rpm} && !$::testing; if (defined $o->{init}) { my ($res, $msg) = &{$o->{init}}; if (!$res) { @@ -155,21 +155,3 @@ sub wizard { $page = $o->{pages}{$next} } } - -## fix duplicate check_rpm with /usr/lib/libDrakX/wizards.pm -sub check_rpm_local { - my ($rpms) = @_; - foreach my $rpm (@$rpms) { - if (!$in->do_pkgs->is_installed($rpm)) { - if ($in->ask_okcancel("", N("%s is not installed\nClick \"Next\" to install or \"Cancel\" to quit", c::from_utf8($rpm)))) { - $::testing and next; - if (!$in->do_pkgs->install($rpm)) { - $::Wizard_finished = 1; - $in->ask_okcancel(N("Error"), N("Installation failed")); - $in->exit; - } - } - else { $in->exit } - } - } -} -- cgit v1.2.1