summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 17:48:45 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-08 17:48:45 +0000
commitbeac6f4766d136962beac2bdb187798ce86414aa (patch)
treed9c67a56c30e35a77445126752b3bbadf9af06ce /perl-install/standalone.pm
parentba1f04e7c037473fe25d7985a8180ce6fdb16f5c (diff)
downloaddrakx-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.pm15
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;