summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
commitc38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf (patch)
tree6ab9fab8ff9e4273ce051c7947877e38c1c08ea6 /perl-install/modules.pm
parentdbb92fc24abd933eff171909db38d78e1d2f40c6 (diff)
downloaddrakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.gz
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.bz2
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.xz
drakx-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.zip
no_comment
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index c82cee6a1..734523fcb 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -379,6 +379,19 @@ sub load {
}
$conf{$name}{options} = join " ", @options if @options;
}
+sub load_multi {
+ my $f; $f = sub { map { $f->(@{$deps{$_}}), $_ } @_ };
+ my %l; my @l =
+ grep { !$conf{$_}{loaded} }
+ grep { my $o = $l{$_}; $l{$_} = 1; !$o }
+ $f->(@_);
+
+ $::testing and log::l("i would install modules @l"), return;
+
+ run_program::run("extract_archive", "/lib/modules.cz2", "/tmp", map { "$_.o" } @l);
+ run_program::run(["insmod_", "insmod"], "/tmp/$_.o") and $conf{$_}{loaded} = 1 foreach @l;
+ unlink map { "/tmp/$_.o" } @l;
+}
sub unload($;$) {
my ($m, $remove_alias) = @_;