Summary: | media-sound/alsa-utils-1.0.17: bad upgrade path to /etc/modprobe.d/alsa.conf | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Matthias Schwarzott <zzam> |
Component: | New packages | Assignee: | Gentoo ALSA team [DISABLED] <alsa-bugs> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | jcolby |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 274942 |
Description
Matthias Schwarzott
![]() A better pkg_preinst() function for the ebuilds, based on the way media-video/em8300-modules does it: pkg_preinst() { linux-mod_pkg_preinst local old1="${ROOT}/etc/modprobe.d/alsa" local old2="${ROOT}/etc/modules.d/alsa" local new="${ROOT}/etc/modprobe.d/alsa.conf" if [[ ! -a ${new} ]]; then if [[ -a ${old1} ]]; then elog "Renaming /etc/modprobe.d/alsa to /etc/modprobe.d/alsa.conf" mv "${old1}" "${new}" elif [[ -a ${old2} ]]; then elog "Moving old alsa configuration in /etc/modules.d to new" elog "location in /etc/modprobe.d" mv "${old2}" "${new}" fi fi } Please ignore the 'linux-mod_pkg_preinst' line in my previous comment. Cut'n'paste error :) pkg_preinst() { local old1="${ROOT}/etc/modprobe.d/alsa" local old2="${ROOT}/etc/modules.d/alsa" local new="${ROOT}/etc/modprobe.d/alsa.conf" if [[ ! -a ${new} ]]; then if [[ -a ${old1} ]]; then elog "Renaming /etc/modprobe.d/alsa to /etc/modprobe.d/alsa.conf" mv "${old1}" "${new}" elif [[ -a ${old2} ]]; then elog "Moving old alsa configuration in /etc/modules.d to new" elog "location in /etc/modprobe.d" mv "${old2}" "${new}" fi fi } 1.0.20-r4 handles this... not in the proposed way, but it does Looks like this might not be completely resolved with 1.0.20-r4:
* Obsolete config /etc/modules.d/alsa found.
*
* ERROR: media-sound/alsa-utils-1.0.20-r4 failed.
* Call stack:
* ebuild.sh, line 49: Called pkg_setup
* alsa-utils-1.0.20-r4.ebuild, line 34: Called die
* The specific snippet of code:
* die "Move /etc/modules.d/alsa to /etc/modprobe.d/alsa.conf."
* The die message:
* Move /etc/modules.d/alsa to /etc/modprobe.d/alsa.conf.
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/media-sound/alsa-utils-1.0.20-r4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-sound/alsa-utils-1.0.20-r4/temp/die.env'.
*
>>> Failed to emerge media-sound/alsa-utils-1.0.20-r4, Log file:
(In reply to comment #4) > Looks like this might not be completely resolved with 1.0.20-r4: > * die "Move /etc/modules.d/alsa to /etc/modprobe.d/alsa.conf." Failed to read the message? (In reply to comment #5) > (In reply to comment #4) > > Failed to read the message? > Looks like I did. :) This doesn't seem very user friendly, is there a reason why the ebuild does not do this? (In reply to comment #6) > Looks like I did. :) This doesn't seem very user friendly, is there a reason > why the ebuild does not do this? The error message says "Move /etc/modules.d/alsa to /etc/modprobe.d/alsa.conf." I thought that the ebuild had an error doing that, not that it wanted me to do that. Why can't the ebuild just move the files by itself? (In reply to comment #7) > (In reply to comment #6) > > Looks like I did. :) This doesn't seem very user friendly, is there a reason > > why the ebuild does not do this? > > The error message says "Move /etc/modules.d/alsa to /etc/modprobe.d/alsa.conf." > I thought that the ebuild had an error doing that, not that it wanted me to do > that. Why can't the ebuild just move the files by itself? > agreed. I thought the same thing when I saw the error. It wasn't until I googled for it and found this bug entry that I knew what was wrong. This is not user friendly and should be made so. Perhaps a new bug should be opened as a portage feature enhancement though, |