diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-01-03 16:25:35 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-01-03 16:25:35 +0000 |
commit | 260f7a866e5949c77309727c978ad12adc26d420 (patch) | |
tree | e5997a31ddf47b089dd3982832a6b78d21581232 /drakwizard.pl | |
parent | 2c0d82156fa7b81b232684cc334ea9b0a379c439 (diff) | |
download | drakwizard-260f7a866e5949c77309727c978ad12adc26d420.tar drakwizard-260f7a866e5949c77309727c978ad12adc26d420.tar.gz drakwizard-260f7a866e5949c77309727c978ad12adc26d420.tar.bz2 drakwizard-260f7a866e5949c77309727c978ad12adc26d420.tar.xz drakwizard-260f7a866e5949c77309727c978ad12adc26d420.zip |
use wizards::check_rpm
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 22 |
1 files 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 } - } - } -} |