summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gotti <jgotti@mandriva.com>2002-09-11 09:03:33 +0000
committerJonathan Gotti <jgotti@mandriva.com>2002-09-11 09:03:33 +0000
commit96926e2d1ab8396ad0128c7791940278d55c1faf (patch)
treeefb6f282499cffac06a14075ccd4868b28b93b60
parent8cd320d720618b7b883d50d1d3cfd5c1662d61e6 (diff)
downloaddrakx-backup-do-not-use-96926e2d1ab8396ad0128c7791940278d55c1faf.tar
drakx-backup-do-not-use-96926e2d1ab8396ad0128c7791940278d55c1faf.tar.gz
drakx-backup-do-not-use-96926e2d1ab8396ad0128c7791940278d55c1faf.tar.bz2
drakx-backup-do-not-use-96926e2d1ab8396ad0128c7791940278d55c1faf.tar.xz
drakx-backup-do-not-use-96926e2d1ab8396ad0128c7791940278d55c1faf.zip
use do_pkgs for check and install ImageMagick
-rwxr-xr-xperl-install/standalone/draksplash9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index eba692af6..74ed91c6f 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -1,6 +1,7 @@
#!/usr/bin/perl
use lib qw(/usr/lib/libDrakX);
+use standalone;
use MDK::Common;
use Gtk;
use interactive;
@@ -29,9 +30,11 @@ my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window ("toplevel
$window->signal_connect(delete_event => sub { $::isEmbedded ? kill(USR1, $::CCPID) : &CloseAppWindow });
#- verification of package image magik
-$in->ask_warn(_("Error"),_("package ImageMagick is required for correct working"))
- and $::isEmbedded ? kill(USR1, $::CCPID) : &CloseAppWindow if system('rpm -q ImageMagick');
-
+if(!$in->do_pkgs->is_installed('ImageMagick')){
+ $in->ask_okcancel(_("Error"),_("package 'ImageMagick' is required for correct working.\nClick \"Ok\" to install 'ImageMagick' or \"Cancel\" to quit"))
+ and $in->do_pkgs->install('ImageMagick')
+ or $::isEmbedded ? kill(USR1, $::CCPID) : &CloseAppWindow ;
+}
#- application vars
my $tmp_path = '/tmp/draksplash/';