summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-08 07:56:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-08 07:56:42 +0000
commit55615d37c5692f49680caa79bf897cf8a6b6fdea (patch)
tree6bd45369a0171fa752080aa1fd53d080d63911cd
parent913f41722b6356ef409be928e18dde003d60872c (diff)
downloaddrakx-55615d37c5692f49680caa79bf897cf8a6b6fdea.tar
drakx-55615d37c5692f49680caa79bf897cf8a6b6fdea.tar.gz
drakx-55615d37c5692f49680caa79bf897cf8a6b6fdea.tar.bz2
drakx-55615d37c5692f49680caa79bf897cf8a6b6fdea.tar.xz
drakx-55615d37c5692f49680caa79bf897cf8a6b6fdea.zip
handle s/snd-card/snd/g and s/snd-via686|snd-via8233/snd-via82xx/g more generically
-rw-r--r--perl-install/modules.pm23
1 files changed, 8 insertions, 15 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 7ee4280f8..91b05fbbf 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -255,6 +255,10 @@ sub read_conf {
foreach (cat_($file)) {
next if /^\s*#/;
s/#.*$//;
+
+ s/\b(snd-card-)/snd-/g;
+ s/\b(snd-via686|snd-via8233)\b/snd-via82xx/g;
+
my ($type, $module, $val) = split(/\s+/, chomp_($_), 3) or next;
$val =~ s/\s+$//;
@@ -279,13 +283,6 @@ sub read_conf {
push @{$c{$name}{probeall} ||= []}, delete $c{$alias}{alias};
}
}
- # Convert alsa driver from old naming system to new one (snd-card-XXX => snd-XXX)
- # Ensure correct upgrade for snd-via683 and snd-via8233 drivers
- foreach my $alias (sort keys %c) {
- $c{$alias}{alias} =~ s/^snd-card/snd/;
- $c{$alias}{alias} = 'snd-via82xx' if $c{$alias}{alias} =~ /^snd-via686|^snd-via8233/;
- }
-
\%c;
}
@@ -317,17 +314,13 @@ sub write_conf() {
} elsif ($type eq 'alias' && $module =~ /scsi_hostadapter|usb-interface/) {
#- remove old aliases which are replaced by probeall
$_ = '';
- } elsif ($type eq 'above') {
- # Convert alsa driver from old naming system to new one (snd-card-XXX => snd-XXX)
- # 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{$module}{above} or $_ = '';
+ } elsif ($type eq 'above' && !defined $conf{$module}{above}) {
+ $_ = '';
+ } elsif ($type eq 'alias' && !defined $conf{$module}{alias}) {
+ $_ = '';
} elsif ($conf{$module}{$type} && $conf{$module}{$type} ne $val) {
my $v = join(' ', uniq(deref($conf{$module}{$type})));
$_ = "$type $module $v\n";
- } elsif ($type eq 'alias' && !defined $conf{$module}{alias}) {
- $_ = '';
}
} $file;