Accepting request 65013 from multimedia:libs

Accepted submit request 65013 from user licensedigger

OBS-URL: https://build.opensuse.org/request/show/65013
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pulseaudio?expand=0&rev=74
This commit is contained in:
Sascha Peilicke 2011-03-23 15:05:26 +00:00 committed by Git OBS Bridge
commit 0f15f1010c
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 21 14:51:21 CET 2011 - tiwai@suse.de
- Fix handling of /etc/mplayer/mplayer.conf in setup-pulseaudio
script (bnc#681113)
-------------------------------------------------------------------
Thu Feb 17 17:54:45 CET 2011 - tiwai@suse.de

View File

@ -28,6 +28,8 @@ check_root() {
PROFNAME=/etc/profile.d/pulseaudio.sh
CPROFNAME=/etc/profile.d/pulseaudio.csh
MPLAYER_CONF=/etc/mplayer/mplayer.conf
set_variable () {
if test -f $PROFNAME &&
grep -q "export $1"= $PROFNAME; then
@ -79,11 +81,13 @@ enable_libao() {
enable_mplayer() {
echo "Enabling PulseAudio for mplayer..."
if test -f /etc/mplayer/mplayer.conf; then
if grep -q '^ao=' /etc/mplayer/mplayer.conf; then
perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/mplayer/mplayer.conf
if test -f $MPLAYER_CONF; then
if grep -q '^ao *= *pulse' $MPLAYER_CONF; then
:
elif grep -q '^ao *=' $MPLAYER_CONF; then
sed -i -e 's/^ao *= *\(.*\)$/ao=pulse,\1/g' $MPLAYER_CONF
else
echo "ao=pulse" >> /etc/mplayer/mplayer.conf
echo "ao=pulse" >> $MPLAYER_CONF
fi
fi
@ -178,9 +182,10 @@ disable_libao() {
}
disable_mplayer() {
if test -f /etc/mplayer/mplayer.conf; then
if test -f $MPLAYER_CONF; then
echo "Disabling PulseAudio for mplayer..."
perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf
sed -i -e 's/^ao *= *pulse,*/ao=/g' \
-e 's/^ao *= *$/ao=alsa/g' $MPLAYER_CONF
fi
}