summaryrefslogtreecommitdiffstats
path: root/perl-install/commands.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-06 10:33:38 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-06 10:33:38 +0000
commite9c6665ac3bd856e38bca0685bf5b8ee34997977 (patch)
tree09a6b5aab24b82fd5d68a67313c3b73f96547415 /perl-install/commands.pm
parent49d9689b2bd16bcda5a294e3ac9669d14f2ff2b9 (diff)
downloaddrakx-e9c6665ac3bd856e38bca0685bf5b8ee34997977.tar
drakx-e9c6665ac3bd856e38bca0685bf5b8ee34997977.tar.gz
drakx-e9c6665ac3bd856e38bca0685bf5b8ee34997977.tar.bz2
drakx-e9c6665ac3bd856e38bca0685bf5b8ee34997977.tar.xz
drakx-e9c6665ac3bd856e38bca0685bf5b8ee34997977.zip
no_comment
Diffstat (limited to 'perl-install/commands.pm')
-rw-r--r--perl-install/commands.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index a739452b0..f4ed2d870 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -492,9 +492,12 @@ sub lspci {
}
sub dmesg { print cat_("/tmp/syslog"); }
+my %cached_failed_install_cpio;
+#- double space between sub and install_cpio cuz install_cpio is not a shell command
sub install_cpio($$) {
my ($dir, $name) = @_;
+ return if $cached_failed_install_cpio{"$dir $name"};
return "$dir/$name" if -e "$dir/$name";
my $cpio = "$dir.cpio.bz2";
@@ -503,8 +506,10 @@ sub install_cpio($$) {
eval { rm("-r", $dir) };
mkdir $dir, 0755;
require 'run_program.pm';
- run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
- "$dir/$name";
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*") and return "$dir/$name";
+
+ #- not found, cache result
+ $cached_failed_install_cpio{"$dir $name"} = 1;
}
#-######################################################################################