Summary: | sys-apps/module-init-tools-3.6 breaks the media-sound/alsa-utils init script | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Todd Merrill <turmlos> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | agent_jdh, alsa-bugs, harrisl, rahul |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://git.kernel.org/?p=linux/kernel/git/kay/module-init-tools.git;a=commit;h=13be3f25fb6c76e69c9e9bdfe5717acdc5d18b95 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Proposed fix |
Description
Todd Merrill
2009-02-10 19:29:57 UTC
I'm no sed expert, but changing: modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p' to: modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' Fixes the problem. However, I don't know how to make this backwards compatible. I've assigned it to the baselayout guys because this change may affect more than just alsa-utils, but I've CCed the alsa team in case they want to investigate possible sed changes. This code has been problematic for a long time and will more likely be removed then patched up further. Ah wait, now loading has been broken as well. Great. does this really need changes to module-init-tools ? i imagine the alsa script could detect whether the path starts with a / and if it doesnt, prepend /lib/modules/`uname -r`/ ... i'll talk to upstream to see how things should go Created attachment 181750 [details, diff]
Proposed fix
The fix seems pretty simple, just remove the obrigatory / at the beggining of the expressions
Patch attached
(In reply to comment #1) > I'm no sed expert, but changing: > modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p' > > to: > modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' > > Fixes the problem. However, I don't know how to make this backwards compatible. > Sorry, didn't see your reply, the patch i posted does exactly that, and it is backwards compatible, see: ~ $ echo "/lib/modules/2.6.28-gentoo-r1/kernel/sound/core/oss/snd-mixer-oss.ko" | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' snd-mixer-oss ~ $ echo "kernel/sound/core/oss/snd-mixer-oss.ko" | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' snd-mixer-oss maybe i'm missing something, but why are you escaping the / in the replacement expression ? you're using a : as a delimiter, so there's no need for / to be escaped. (In reply to comment #8) > maybe i'm missing something, but why are you escaping the / in the replacement > expression ? you're using a : as a delimiter, so there's no need for / to be > escaped. > You're right, it isn't needed, but it was there for the first time, so i just kept fair enough. please 2 remove though as all of the \/\/\/\/\/ makes me cry ;). Ok, sadly there's two bugs open for this. Since the other bug has an identical patch, but without the \/'s I'm going to mark this one as the duplicate, even though it was technically filed earlier... So, are we now just waiting for someone from the alsa herd to apply it? *** This bug has been marked as a duplicate of bug 258930 *** |