diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2001-08-08 17:48:45 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2001-08-08 17:48:45 +0000 |
commit | beac6f4766d136962beac2bdb187798ce86414aa (patch) | |
tree | d9c67a56c30e35a77445126752b3bbadf9af06ce /perl-install/standalone.pm | |
parent | ba1f04e7c037473fe25d7985a8180ce6fdb16f5c (diff) | |
download | drakx-backup-do-not-use-beac6f4766d136962beac2bdb187798ce86414aa.tar drakx-backup-do-not-use-beac6f4766d136962beac2bdb187798ce86414aa.tar.gz drakx-backup-do-not-use-beac6f4766d136962beac2bdb187798ce86414aa.tar.bz2 drakx-backup-do-not-use-beac6f4766d136962beac2bdb187798ce86414aa.tar.xz drakx-backup-do-not-use-beac6f4766d136962beac2bdb187798ce86414aa.zip |
New package handling functions
Diffstat (limited to 'perl-install/standalone.pm')
-rw-r--r-- | perl-install/standalone.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index 408088b33..7cb1d2dd7 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -36,9 +36,22 @@ sub install_if { sub remove { my ($o, @l) = @_; $o->{in}->suspend; - my $ret = system('rpm', '-e ', @l); + my $ret = system('rpm', '-e', @l); $o->{in}->resume; $ret; } +sub remove_nodeps { + my ($o, @l) = @_; + $o->{in}->suspend; + my $ret = system('rpm', '-e', '--nodeps', @l); + $o->{in}->resume; + $ret; +} + +sub is_installed { + my ($o, $pkg) = @_; + system('rpm', '-q', $pkg) == 0; +} + 1; |