fedora core alsaconf patch
Included is a patch that fixes alsaconf to work correctly under fedora core 1. Otherwise alsaconf happily creates a modules.conf file that only contains the alsa configuration and nothing else (a path in the if's that does not create a $TMP file before the alsa configuration process starts).
Please apply!
Thanks...
-- Fernando
alsaconf/alsaconf.in renamed from alsaconf/alsaconf.in~ +5 -5
@@ -30,8 +30,10 @@ distribution="suse" elif [ -f /etc/debian_version ]; then distribution="debian" -elif [ -f /etc/redhat-release ]; then +elif [ -f /etc/redhat-release -a `grep -c "Red Hat" /etc/redhat-release 2>/dev/null` != 0 ]; then distribution="redhat" +elif [ -f /etc/fedora-release -a `grep -c "Fedora" /etc/fedora-release 2>/dev/null` != 0 ]; then + distribution="fedora" else distribution="unknown" fi
@@ -532,10 +534,8 @@ SOUND_CORE="snd" fi - if [ "$distribution" = "redhat" ] ; then - if grep -q "Red Hat" /etc/redhat-release >/dev/null 2>&1 ; then - remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP - fi + if [ "$distribution" = "redhat" -o "$distribution" = "fedora" ] ; then + remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP else remove_ac_block < $cfgfile | remove_y2_block | uniq > $TMP fi
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
Quoted 6 lines
Included is a patch that fixes alsaconf to work correctly under fedora core 1. Otherwise alsaconf happily creates a modules.conf file that only contains the alsa configuration and nothing else (a path in the if's that does not create a $TMP file before the alsa configuration process starts).
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a /etc/redhat-release file but without having "Red Hat" inside would trigger the bug.
The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
-- Fernando
Quoted 5 lines
Quoted 5 lines
Included is a patch that fixes alsaconf to work correctly under fedora core 1. Otherwise alsaconf happily creates a modules.conf file that only contains the alsa configuration and nothing else (a path in the if's that does not create a $TMP file before the alsa configuration process starts).
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
PATCH 1/1 add support for mandrake in alsaconf
Quoted 9 lines · Fernando Pablo Lopez-Lezcano
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a
/etc/redhat-releasefile but without having "Red Hat" inside would trigger the bug.
Quoted 4 lines
The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
untested:
Index: alsaconf/alsaconf.in
===================================================================
RCS file: /cvsroot/alsa/alsa-utils/alsaconf/alsaconf.in,v retrieving revision 1.5
alsaconf.in +2 -0
@@ -24,6 +24,8 @@ if [ -f /etc/SuSE-release -o -f /etc/Uni distribution="suse" elif [ -f /etc/debian_version ]; then distribution="debian" +elif [ -f /etc/mandrake-release ]; then + distribution="mandrake" elif [ -f /etc/redhat-release -a `grep -c "Red Hat" /etc/redhat-release 2>/dev/null` != 0 ]; then distribution="redhat" elif [ -f /etc/fedora-release -a `grep -c "Fedora" /etc/fedora-release 2>/dev/null` != 0 ]; then
Re: [PATCH] add support for mandrake in alsaconf
At Mon, 24 Nov 2003 14:59:42 +0000,
Quoted 13 lines · Thierry Vignaud
[1 <text/plain (7bit)>]
Quoted 9 lines · Fernando Pablo Lopez-Lezcano
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a
/etc/redhat-releasefile but without having "Red Hat" inside would trigger the bug.
Quoted 6 lines
Quoted 4 lines
The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
untested:
shall i apply this? let me know.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: [PATCH] add support for mandrake in alsaconf
Quoted 15 lines
At Mon, 24 Nov 2003 14:59:42 +0000,
Quoted 13 lines · Thierry Vignaud
[1 <text/plain (7bit)>]
Quoted 9 lines · Fernando Pablo Lopez-Lezcano
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a
/etc/redhat-releasefile but without having "Red Hat" inside would trigger the bug.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
untested:
shall i apply this? let me know.
I think it does no harm but does not change the end result either. It creates a new option ("mandrake") but there is no code to handle it so the if's should just execute the SuSE (default) code as they do now.
Options:
a) define 'distribution="redhat"' for the mandrake detection code _if_ the oss options erasure for redhat works fine under mandrake (mandrake users should test this).
b) add another handler for mandrake's modules.conf oss options (should be written taking into account whatever mandrake uses to configure sound so that the proper strings are removed from modules.conf).
-- Fernando
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: [PATCH] add support for mandrake in alsaconf
Quoted 24 lines · Fernando Pablo Lopez-Lezcano
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a
/etc/redhat-releasefile but without having "Red Hat" inside would trigger the bug.The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
Quoted 3 lines
Quoted 1 line
untested:
shall i apply this? let me know.
I think it does no harm but does not change the end result either. It creates a new option ("mandrake") but there is no code to handle it so the if's should just execute the SuSE (default) code as they do now.
Quoted 8 lines
Options:
a) define 'distribution="redhat"' for the mandrake detection code _if_ the oss options erasure for redhat works fine under mandrake (mandrake users should test this).
b) add another handler for mandrake's modules.conf oss options (should be written taking into account whatever mandrake uses to configure sound so that the proper strings are removed from modules.conf).
so why not doing such as threat all distros that provide /etc/redhat-release the same way. i don't think there's any distro out that provide /etc/redhat-release for compatibility that would like to have users loose their module configuration:
Index: alsaconf/alsaconf.in
===================================================================
RCS file: /cvsroot/alsa/alsa-utils/alsaconf/alsaconf.in,v retrieving revision 1.5
alsaconf.in +2 -4
@@ -24,10 +24,8 @@ if [ -f /etc/SuSE-release -o -f /etc/Uni distribution="suse" elif [ -f /etc/debian_version ]; then distribution="debian" -elif [ -f /etc/redhat-release -a `grep -c "Red Hat" /etc/redhat-release 2>/dev/null` != 0 ]; then +elif [ -f /etc/redhat-release ]; then distribution="redhat" -elif [ -f /etc/fedora-release -a `grep -c "Fedora" /etc/fedora-release 2>/dev/null` != 0 ]; then - distribution="fedora" else distribution="unknown" fi
@@ -548,7 +546,7 @@ Do you want to modify ${cfgfile}?" 8 50 SOUND_CORE="snd" fi - if [ "$distribution" = "redhat" -o "$distribution" = "fedora" ] ; then + if [ "$distribution" = "redhat" ] ; then remove_ac_block < $cfgfile | remove_sndconfig_block | uniq > $TMP else remove_ac_block < $cfgfile | remove_y2_block | uniq > $TMP
Re: [PATCH] add support for mandrake in alsaconf
Quoted 33 lines
Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 3 lines
I think we need a similar extension to support Mandrake, after installation from the sources all modules in modules.conf where gone, except the ones from alsa.. :-)
I think the patch will fix mandrake too. I have the dubious honor of being able to claim ownership of the original bug :-( Anything having a
/etc/redhat-releasefile but without having "Red Hat" inside would trigger the bug.The currently result with Mandrake would be to use the SuSE filter to try to erase the oss preferences from modules.conf. If the RedHat filter is better then another "if" could be added to the distro selection code to include Mandrake.
Quoted 3 lines
Quoted 1 line
untested:
shall i apply this? let me know.
I think it does no harm but does not change the end result either. It creates a new option ("mandrake") but there is no code to handle it so the if's should just execute the SuSE (default) code as they do now.
Quoted 8 lines
Options:
a) define 'distribution="redhat"' for the mandrake detection code _if_ the oss options erasure for redhat works fine under mandrake (mandrake users should test this).
b) add another handler for mandrake's modules.conf oss options (should be written taking into account whatever mandrake uses to configure sound so that the proper strings are removed from modules.conf).
Quoted 4 lines
so why not doing such as threat all distros that provide
/etc/redhat-releasethe same way. i don't think there's any distro out that provide/etc/redhat-releasefor compatibility that would like to have users loose their module configuration:
With the patch I supplied no distros that user /etc/redhat-release will lose their configuration (I hope, at least not due to the bug I introduced a long time ago which is fixed by the patch). Distros that are not RedHat or Fedora will execute the SuSE code path.
Your patch is fine, I would say. But it has an assumption I don't quite like. I wrote "remove_sndconfig_block" (basing it on "remove_y2_block") by looking at all the strings that the sndconfig utility was adding to modules.conf (sndconfig was the way RedHat was doing sound configuration quite a while ago, I think this has changed). I assume the same happened when "remove_y2_block" was written (in this case with SuSE's yast2). I don't know what sound configurators are being used by other releases that use /etc/redhat-release (mandrake is one, probably others?), they may be creating other strings in modules.conf that will not be removed by "remove_sndconfig_block" so they may need custom "remove_xx_block" functions that deal with what they add to modules.conf.
Just being picky :-)
-- Fernando
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: [PATCH] add support for mandrake in alsaconf
Quoted 19 lines · Fernando Pablo Lopez-Lezcano
Quoted 9 lines
Quoted 8 lines
Options:
a) define 'distribution="redhat"' for the mandrake detection code _if_ the oss options erasure for redhat works fine under mandrake (mandrake users should test this).
b) add another handler for mandrake's modules.conf oss options (should be written taking into account whatever mandrake uses to configure sound so that the proper strings are removed from modules.conf).Quoted 4 lines
so why not doing such as threat all distros that provide
/etc/redhat-releasethe same way. i don't think there's any distro out that provide/etc/redhat-releasefor compatibility that would like to have users loose their module configuration:With the patch I supplied no distros that user
/etc/redhat-releasewill lose their configuration (I hope, at least not due to the bug I introduced a long time ago which is fixed by the patch). Distros that are not RedHat or Fedora will execute the SuSE code path.
Quoted 6 lines
Your patch is fine, I would say. But it has an assumption I don't quite like. I wrote "
remove_sndconfig_block" (basing it on "remove_y2_block") by looking at all the strings that the sndconfig utility was adding to modules.conf (sndconfig was the way RedHat was doing sound configuration quite a while ago, I think this has changed).
as for mandrake, we do not rely on sndconfig (though we still provide it for isa pnp sound card owners)
drakx (the installer) and draksound (the standalone soundconfig tool) only write "sound-slot-X" aliases and "above XXX snd-pcm-oss" lines for oss compatibility (if $module =~ /^snd-/) in /etc/modules.conf
Quoted 4 lines
I assume the same happened when "
remove_y2_block" was written (in this case with SuSE's yast2). I don't know what sound configurators are being used by other releases that use/etc/redhat-release(mandrake is one, probably others?),
mandrake does not use the sound alias nor any isa oss paremeters by default but sndconfig users will manually do.
i guess someone that succesfully used sndconfig won't try alsaconf, but we'd better be idiot-proof and not remove such modules
Quoted 4 lines
they may be creating other strings in modules.conf that will not be removed by "
remove_sndconfig_block" so they may need custom "remove_xx_block" functions that deal with what they add to modules.conf.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: [PATCH] add support for mandrake in alsaconf
At Mon, 24 Nov 2003 20:33:40 +0000,
Quoted 29 lines · Thierry Vignaud
Quoted 19 lines · Fernando Pablo Lopez-Lezcano
Quoted 9 lines
Quoted 8 lines
Options:
a) define 'distribution="redhat"' for the mandrake detection code _if_ the oss options erasure for redhat works fine under mandrake (mandrake users should test this).
b) add another handler for mandrake's modules.conf oss options (should be written taking into account whatever mandrake uses to configure sound so that the proper strings are removed from modules.conf).Quoted 4 lines
so why not doing such as threat all distros that provide
/etc/redhat-releasethe same way. i don't think there's any distro out that provide/etc/redhat-releasefor compatibility that would like to have users loose their module configuration:With the patch I supplied no distros that user
/etc/redhat-releasewill lose their configuration (I hope, at least not due to the bug I introduced a long time ago which is fixed by the patch). Distros that are not RedHat or Fedora will execute the SuSE code path.Quoted 6 lines
Your patch is fine, I would say. But it has an assumption I don't quite like. I wrote "
remove_sndconfig_block" (basing it on "remove_y2_block") by looking at all the strings that the sndconfig utility was adding to modules.conf (sndconfig was the way RedHat was doing sound configuration quite a while ago, I think this has changed).
Quoted 6 lines
as for mandrake, we do not rely on sndconfig (though we still provide it for isa pnp sound card owners)
drakx (the installer) and draksound (the standalone soundconfig tool) only write "sound-slot-X" aliases and "above XXX snd-pcm-oss" lines for oss compatibility (if $module =~ /^snd-/) in
/etc/modules.conf
then remove_y2_block() would be enough.
i'll take Thierry's first patch. it will be in pre3 release.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
At 21 Nov 2003 15:40:51 -0800,
Quoted 8 lines · Fernando Pablo Lopez-Lezcano
Included is a patch that fixes alsaconf to work correctly under fedora core 1. Otherwise alsaconf happily creates a modules.conf file that only contains the alsa configuration and nothing else (a path in the if's that does not create a $TMP file before the alsa configuration process starts).
Please apply!
thanks!
it's now on cvs.
btw, do you have still a problem of linux/workqueue.h on fedora core1 ?
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/