summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-04 16:03:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-04 16:03:07 +0000
commit19b5f3fb3cf80410cdd12784028242cf5956ca4f (patch)
treeb7db8f615bb1e1027b3dab7656d64ec08e1eeb39
parentaaa119565207a6ee2f5cddb2730e51e2af49a21e (diff)
downloadurpmi-19b5f3fb3cf80410cdd12784028242cf5956ca4f.tar
urpmi-19b5f3fb3cf80410cdd12784028242cf5956ca4f.tar.gz
urpmi-19b5f3fb3cf80410cdd12784028242cf5956ca4f.tar.bz2
urpmi-19b5f3fb3cf80410cdd12784028242cf5956ca4f.tar.xz
urpmi-19b5f3fb3cf80410cdd12784028242cf5956ca4f.zip
have urpmi quiet option "-q" for urpm_cmd()
-rw-r--r--t/helper.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/t/helper.pm b/t/helper.pm
index 60f5de8d..870baa2b 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -51,11 +51,16 @@ my $urpmi_debug_opt = '-q';
sub urpm_cmd {
my ($prog, $o_perl_para) = @_;
$o_perl_para ||= '';
+ "perl $o_perl_para -I.. ../$prog --urpmi-root $::pwd/root $urpmi_debug_opt";
+}
+sub urpm_cmd_no_quiet {
+ my ($prog, $o_perl_para) = @_;
+ $o_perl_para ||= '';
"perl $o_perl_para -I.. ../$prog --urpmi-root $::pwd/root";
}
sub run_urpm_cmd {
my ($prog, $o_perl_para) = @_;
- my $cmd = urpm_cmd($prog, $o_perl_para);
+ my $cmd = urpm_cmd_no_quiet($prog, $o_perl_para);
print "# $cmd\n";
`$cmd`;
}
@@ -63,19 +68,19 @@ sub urpmi_cmd() { urpm_cmd('urpmi') }
sub urpmi_addmedia {
my ($para) = @_;
- system_(urpm_cmd('urpmi.addmedia') . " $urpmi_debug_opt $para");
+ system_(urpm_cmd('urpmi.addmedia') . " $para");
}
sub urpmi_removemedia {
my ($para) = @_;
- system_(urpm_cmd('urpmi.removemedia') . " $urpmi_debug_opt $para");
+ system_(urpm_cmd('urpmi.removemedia') . " $para");
}
sub urpmi_update {
my ($para) = @_;
- system_(urpm_cmd('urpmi.update') . " $urpmi_debug_opt $para");
+ system_(urpm_cmd('urpmi.update') . " $para");
}
sub urpmi {
my ($para) = @_;
- system_(urpmi_cmd() . " --ignoresize $urpmi_debug_opt $para");
+ system_(urpmi_cmd() . " --ignoresize $para");
}
sub test_urpmi_fail {
my ($para) = @_;