summaryrefslogtreecommitdiffstats
path: root/perl-install/modules/modules_conf.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-10 02:00:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-10 02:00:45 +0000
commitff2191b0d6fe81de6447fe1d453f8640f1a19b42 (patch)
tree3436062bace3fe45eb9d345ec6b443f28c48d554 /perl-install/modules/modules_conf.pm
parentec3d78cf088439fbf9f9c71f75565417ccad831b (diff)
downloaddrakx-ff2191b0d6fe81de6447fe1d453f8640f1a19b42.tar
drakx-ff2191b0d6fe81de6447fe1d453f8640f1a19b42.tar.gz
drakx-ff2191b0d6fe81de6447fe1d453f8640f1a19b42.tar.bz2
drakx-ff2191b0d6fe81de6447fe1d453f8640f1a19b42.tar.xz
drakx-ff2191b0d6fe81de6447fe1d453f8640f1a19b42.zip
internally keep module names according to what we configure (and our kernel, 2.4 or 2.6)
Diffstat (limited to 'perl-install/modules/modules_conf.pm')
-rw-r--r--perl-install/modules/modules_conf.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/perl-install/modules/modules_conf.pm b/perl-install/modules/modules_conf.pm
index fc9f92179..c0944010d 100644
--- a/perl-install/modules/modules_conf.pm
+++ b/perl-install/modules/modules_conf.pm
@@ -9,14 +9,25 @@ our @ISA = qw(modules::any_conf);
sub file { '/etc/modules.conf' }
sub handled_fields { qw(alias above options probeall) }
+sub mapping {
+ my ($_conf, @modules) = @_;
+ my @l = map { modules::mapping_26_24($_) } @modules;
+ wantarray ? @l : $l[0];
+}
+
sub get_above {
my ($conf, $module) = @_;
+ $module = $conf->mapping($module);
+
$conf->{$module} && $conf->{$module}{above};
}
sub set_above {
my ($conf, $module, $o_modules) = @_;
+ $module = $conf->mapping($module);
+
if ($o_modules) {
- $conf->{$module}{above} = $o_modules;
+ my $modules = join(' ', $conf->mapping(split(' ', $o_modules)));
+ $conf->{$module}{above} = $modules;
} else {
delete $conf->{$module}{above};
}