From 19b5f3fb3cf80410cdd12784028242cf5956ca4f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 4 Feb 2008 16:03:07 +0000 Subject: have urpmi quiet option "-q" for urpm_cmd() --- t/helper.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/helper.pm b/t/helper.pm index 60f5de8d..870baa2b 100644 --- a/t/helper.pm +++ b/t/helper.pm @@ -49,13 +49,18 @@ my $urpmi_debug_opt = '-q'; #$urpmi_debug_opt = '-v --debug'; 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) = @_; -- cgit v1.2.1