Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75445 - MPD failes with FEATURES="collision-protect"
Summary: MPD failes with FEATURES="collision-protect"
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High critical
Assignee: Brian Harring (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-23 07:50 UTC by Lars Strojny
Modified: 2005-01-20 11:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Strojny 2004-12-23 07:50:22 UTC
The mpd-ebuild (Music player daemon) tries to create two logfiles in /var/log/mpd{,.error}.log

Here is the fix:
--- /usr/portage/media-sound/mpd/mpd-0.11.5.ebuild      2004-12-19 07:08:45.000000000 +0100
+++ /home/lars/mpd-0.11.5-r1.ebuild     2004-12-23 16:38:48.264048054 +0100
@@ -75,11 +75,6 @@
        dodir /usr/share/mpd/playlists
        keepdir /usr/share/mpd/playlists
        dodir /usr/share/mpd/
-       insinto /var/log
-       touch ${T}/blah
-       insopts -m0640 -o mpd -g audio
-       newins ${T}/blah mpd.log
-       newins ${T}/blah mpd.error.log
 }

 pkg_postinst() {
@@ -88,4 +83,12 @@
        einfo "http://www.musicpd.org/wiki/moin.cgi/MpdFAQ if you are having problems."
        einfo
        einfo "The default config now binds the daemon strictly to localhost, rather then all available IPs."
+       insinto /var/log
+       touch ${T}/blah
+       insopts -m0640 -o mpd -g audio
+       for logfile in mpd.log mpd.error ; do
+               if [ ! -e ${logfile} ] ; then
+                       newins ${T}/blah ${logfile}
+               fi
+       done
 }
Comment 1 Brian Harring (RETIRED) gentoo-dev 2005-01-20 11:28:34 UTC
The existing ebuild code is fine; with what you're proposing, portage essentially loses track of those files- additionally, it's a minor crapshot if those files are created or not for distributing binpkgs.
I made a minor screwup initially in not creating those log files initially, and should've had those files created from the start- the current approach is the correct approach, just collision-protect (a useful feature, but not one that's on by default exempting osx) is complaining.