summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-08 18:26:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-08 18:26:31 +0000
commit157fe13a76e798fa8af5f79c792c704a593f6c93 (patch)
tree7dded9e6761033f09709722965d15b14ce7825bd /perl-install/standalone.pm
parentb4fd82d0ced6a2118a51b060d2eff8c4f179b52b (diff)
downloaddrakx-157fe13a76e798fa8af5f79c792c704a593f6c93.tar
drakx-157fe13a76e798fa8af5f79c792c704a593f6c93.tar.gz
drakx-157fe13a76e798fa8af5f79c792c704a593f6c93.tar.bz2
drakx-157fe13a76e798fa8af5f79c792c704a593f6c93.tar.xz
drakx-157fe13a76e798fa8af5f79c792c704a593f6c93.zip
add interactive_pkgs stuff
Diffstat (limited to 'perl-install/standalone.pm')
-rw-r--r--perl-install/standalone.pm21
1 files changed, 9 insertions, 12 deletions
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index 7cb1d2dd7..60f21b729 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -11,6 +11,7 @@ c::bindtextdomain('libDrakX', "/usr/share/locale");
+################################################################################
package interactive_pkgs;
sub interactive::do_pkgs {
@@ -21,22 +22,20 @@ sub interactive::do_pkgs {
sub install {
my ($o, @l) = @_;
$o->{in}->suspend;
- my $ret = system('urpmi', '--auto', '--best-output', @l);
+ my $ret = system('urpmi', '--auto', '--best-output', @l) == 0;
$o->{in}->resume;
$ret;
}
-sub install_if {
- my ($o, $deps, @l) = @_;
- my @deps = deref($deps);
- system('rpm', '-q', @deps) == 0 or return;
- install($o, @l);
+sub is_installed {
+ my ($o, @l) = @_;
+ system('rpm', '-q', @l) == 0;
}
sub remove {
my ($o, @l) = @_;
$o->{in}->suspend;
- my $ret = system('rpm', '-e', @l);
+ my $ret = system('rpm', '-e', @l) == 0;
$o->{in}->resume;
$ret;
}
@@ -44,14 +43,12 @@ sub remove {
sub remove_nodeps {
my ($o, @l) = @_;
$o->{in}->suspend;
- my $ret = system('rpm', '-e', '--nodeps', @l);
+ my $ret = system('rpm', '-e', '--nodeps', @l) == 0;
$o->{in}->resume;
$ret;
}
+################################################################################
-sub is_installed {
- my ($o, $pkg) = @_;
- system('rpm', '-q', $pkg) == 0;
-}
+package standalone;
1;