diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-05 10:49:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-05 10:49:19 +0000 |
commit | df8d11813c57fa2b0f593465917ea184973f6066 (patch) | |
tree | ccfeaeb809ac3288eab5c4962ebfaed940cba3ef /perl-install/standalone.pm | |
parent | b60f507adb161461fee9409618ddda390effa840 (diff) | |
download | drakx-df8d11813c57fa2b0f593465917ea184973f6066.tar drakx-df8d11813c57fa2b0f593465917ea184973f6066.tar.gz drakx-df8d11813c57fa2b0f593465917ea184973f6066.tar.bz2 drakx-df8d11813c57fa2b0f593465917ea184973f6066.tar.xz drakx-df8d11813c57fa2b0f593465917ea184973f6066.zip |
(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
Diffstat (limited to 'perl-install/standalone.pm')
-rw-r--r-- | perl-install/standalone.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |