summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-12-04 12:42:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-12-04 12:42:02 +0000
commit9c5899818f764900d5cc2d98c78fa3289233acbe (patch)
treed3d9a886b910476f9d7c5e8c985866e230aac197
parent6eef7bc0b00f1e76542cc9ce86c0fd66b1e3f567 (diff)
downloadurpmi-9c5899818f764900d5cc2d98c78fa3289233acbe.tar
urpmi-9c5899818f764900d5cc2d98c78fa3289233acbe.tar.gz
urpmi-9c5899818f764900d5cc2d98c78fa3289233acbe.tar.bz2
urpmi-9c5899818f764900d5cc2d98c78fa3289233acbe.tar.xz
urpmi-9c5899818f764900d5cc2d98c78fa3289233acbe.zip
fix typo (remove a "undefined value" warning)
-rw-r--r--t/helper.pm9
1 files changed, 6 insertions, 3 deletions
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) = @_;