From df8d11813c57fa2b0f593465917ea184973f6066 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 5 Aug 2002 10:49:19 +0000 Subject: (install): verify at least one package is not installed before displaying a wait_message and calling urpmi (thanks to Jure Repinc) (is_installed): use run_program and redirect stdout to dave null for cleanness --- perl-install/standalone.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone.pm') diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index 474d6beb7..98ca03b97 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -27,6 +27,9 @@ sub interactive::do_pkgs { sub install { my ($o, @l) = @_; + + return 1 if is_installed($o, @l); + my $wait; if ($o->{in}->isa('interactive::newt')) { $o->{in}->suspend; @@ -52,7 +55,7 @@ sub what_provides { sub is_installed { my ($o, @l) = @_; - system('rpm', '-q', @l) == 0; + run_program::run('rpm', '>', '/dev/null', '-q', @l); } sub remove { -- cgit v1.2.1