From 9c5899818f764900d5cc2d98c78fa3289233acbe Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 4 Dec 2006 12:42:02 +0000 Subject: fix typo (remove a "undefined value" warning) --- t/helper.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/helper.pm b/t/helper.pm index 7c8d29b6..10449300 100644 --- a/t/helper.pm +++ b/t/helper.pm @@ -5,7 +5,7 @@ use base 'Exporter'; our @EXPORT = qw(need_root_and_prepare start_httpd httpd_port urpmi_addmedia urpmi_removemedia - urpmi urpme + urpmi_cmd urpmi urpme system_ ); @@ -29,7 +29,6 @@ sub httpd_port { 6969 } sub start_httpd() { $server_pid = fork(); if ($server_pid == 0) { - mkdir 'tmp'; exec './simple-httpd', $pwd, "$pwd/tmp", httpd_port(); exit 1; } @@ -38,6 +37,7 @@ sub start_httpd() { chdir 't' if -d 't'; +mkdir 'tmp'; chomp($::pwd = `pwd`); my $urpmi_debug_opt = '-q'; #$urpmi_debug_opt = '-v --debug'; @@ -50,9 +50,12 @@ sub urpmi_removemedia { my ($para) = @_; system_("perl -I.. ../urpmi.removemedia $urpmi_debug_opt --urpmi-root $::pwd/root $para"); } +sub urpmi_cmd() { + "perl -I.. ../urpmi $urpmi_debug_opt --urpmi-root $::pwd/root --ignoresize"; +} sub urpmi { my ($para) = @_; - system_("perl -I.. ../urpmi $urpmi_debug_opt --urpmi-root $::pwd/root --ignoresize $para"); + system_(urpmi_cmd() . " $para"); } sub urpme { my ($para) = @_; -- cgit v1.2.1