summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-08 01:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-08 01:34:32 +0000
commit06b68210c35eecafa6b2732cef8a7508c243991f (patch)
treeb9c7ab3aadffd4f799755e5c8fe7f37bc3706091 /perl-install
parent149bb85110e0f6de5f16d8acbb636644c4fb114d (diff)
downloaddrakx-06b68210c35eecafa6b2732cef8a7508c243991f.tar
drakx-06b68210c35eecafa6b2732cef8a7508c243991f.tar.gz
drakx-06b68210c35eecafa6b2732cef8a7508c243991f.tar.bz2
drakx-06b68210c35eecafa6b2732cef8a7508c243991f.tar.xz
drakx-06b68210c35eecafa6b2732cef8a7508c243991f.zip
- generalize the snd-pcm-oss case
- cleanup
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/modules.pm27
1 files changed, 15 insertions, 12 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 085abf894..b2430190e 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -242,12 +242,12 @@ sub read_conf {
foreach (cat_($file)) {
next if /^\s*#/;
s/#.*$//;
- my ($type, $alias, $val) = split(/\s+/, chomp_($_), 3) or next;
+ my ($type, $module, $val) = split(/\s+/, chomp_($_), 3) or next;
$val =~ s/\s+$//;
$val = [ split ' ', $val ] if $type eq 'probeall';
- $c{$alias}{$type} = $val;
+ $c{$module}{$type} = $val;
}
#- cheating here: not handling aliases of aliases
while (my ($_k, $v) = each %c) {
@@ -296,11 +296,11 @@ sub write_conf() {
#- Substitute new aliases in modules.conf (if config has changed)
substInFile {
- my ($type, $alias, $module) = split(/\s+/, chomp_($_), 3);
- if ($type eq 'post-install' && $alias eq 'supermount') {
+ my ($type, $module, $module) = split(/\s+/, chomp_($_), 3);
+ if ($type eq 'post-install' && $module eq 'supermount') {
#- remove the post-install supermount stuff.
$_ = '';
- } elsif ($type eq 'alias' && $alias =~ /scsi_hostadapter|usb-interface/) {
+ } elsif ($type eq 'alias' && $module =~ /scsi_hostadapter|usb-interface/) {
#- remove old aliases which are replaced by probeall
$_ = '';
} elsif ($type eq 'above') {
@@ -308,11 +308,11 @@ sub write_conf() {
# Ensure correct upgrade for snd-via683 and snd-via8233 drivers
s/snd-card/snd/g;
s/snd-via686|snd-via8233/snd-via82xx/g;
- defined $conf{$alias}{above} or $_ = '';
- } elsif ($conf{$alias}{$type} && $conf{$alias}{$type} ne $module) {
- my $v = join(' ', uniq(deref($conf{$alias}{$type})));
- $_ = "$type $alias $v\n";
- } elsif ($type eq 'alias' && !defined $conf{$alias}{alias}) {
+ defined $conf{$module}{above} or $_ = '';
+ } elsif ($conf{$module}{$type} && $conf{$module}{$type} ne $module) {
+ my $v = join(' ', uniq(deref($conf{$module}{$type})));
+ $_ = "$type $module $v\n";
+ } elsif ($type eq 'alias' && !defined $conf{$module}{alias}) {
$_ = '';
}
} $file;
@@ -388,8 +388,6 @@ sub when_load {
}
}
- load('snd-pcm-oss') if $name =~ /^snd-/;
-
$conf{$name}{options} = join " ", @options if @options;
if (my $category = module2category($name)) {
@@ -411,6 +409,11 @@ sub when_load {
set_sound_slot($sound_alias, $name);
}
}
+
+ if (my $above = $conf{$name}{above}) {
+ load($above); #- eg: for snd-pcm-oss set by set_sound_slot()
+ }
+
}
sub cz_file() {