Thierry Vignaud <[EMAIL PROTECTED]> writes:

> this should fix it and also convert old snd-card aliases (try it as
> "patch -p0 < /where/it/is/via.diff" in /usr/lib/libDrakX):

or even cleaner:
Index: modules.pm
===================================================================
RCS file: /cooker/gi/perl-install/modules.pm,v
retrieving revision 1.309
retrieving revision 1.312
diff -u -p -r1.309 -r1.312
--- modules.pm	24 Feb 2003 14:09:00 -0000	1.309
+++ modules.pm	13 Mar 2003 17:07:04 -0000	1.312
@@ -1,4 +1,4 @@
-package modules; # $Id: modules.pm,v 1.309 2003/02/24 14:09:00 sbenedict Exp $
+package modules; # $Id: modules.pm,v 1.312 2003/03/13 17:07:04 tvignaud Exp $
 
 use strict;
 use vars qw(%conf);
@@ -219,6 +219,12 @@ 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;
 }
@@ -248,6 +254,11 @@ sub write_conf {
 	} elsif ($type eq 'alias' && $alias =~ /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;
 	} elsif ($conf{$alias}{$type} && $conf{$alias}{$type} ne $module) {
 	    my $v = join(' ', uniq(deref($conf{$alias}{$type})));
 	    $_ = "$type $alias $v\n";

Reply via email to