Comment 2 for bug 384245

Revision history for this message
ble (gupie) wrote : Re: [Bug 384245] Re: mpd uninstall scriptlet fails with err 1

Dnia 2009-06-06, o godz. 18:26:45
Elan Ruusamäe <email address hidden> napisał(a):

> write in ENGLISH, LC_ALL=C before reporting bugs!
>
> what does rpm -V mpd say?
>
> also output of rpm -qp --scripts mpd please.
>
rpm with -V output nothin, with -v:

[root@GOLEM ble]# rpm -V -v mpd
........ c /etc/mpd.conf
........ /etc/rc.d/init.d/mpd
........ /usr/bin/mpd
........ /usr/share/doc/mpd-0.14.2
........ d /usr/share/doc/mpd-0.14.2/AUTHORS.gz
........ d /usr/share/doc/mpd-0.14.2/NEWS.gz
........ d /usr/share/doc/mpd-0.14.2/README.gz
........ d /usr/share/doc/mpd-0.14.2/TODO.gz
........ d /usr/share/doc/mpd-0.14.2/UPGRADING.gz
........ d /usr/share/doc/mpd-0.14.2/mpdconf.example.gz
........ d /usr/share/doc/mpd-0.14.2/protocol.xml.gz
........ d /usr/share/man/man1/mpd.1.gz
........ d /usr/share/man/man5/mpd.conf.5.gz
[root@GOLEM ble]#

mpd is downloaded from master repository

[root@GOLEM 1244283623]# env LC_ALL=C rpm -qp --scripts
mpd-0.14.2-1.i686.rpm
warning: mpd-0.14.2-1.i686.rpm: Header V4 DSA
signature: NOKEY, key ID e4f1bc2d preinstall scriptlet (using /bin/sh):

if /usr/bin/getgid mpd > /dev/null 2>&1; then
 if [ "`/usr/bin/getgid mpd`" != "204" ]; then
  echo "Error: group mpd doesn't have gid=204. Correct
this before installing mpd." 1>&2 exit 1
 fi
else
 echo "Adding group mpd GID=204."
 /usr/sbin/groupadd -g 204 -r mpd 1>&2 || exit $?
 [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || :
fi;

if [ -n "`/bin/id -u mpd 2>/dev/null`" ]; then
 if [ "`/bin/id -u mpd`" != "204" ]; then
  echo "Error: user mpd doesn't have uid=204. Correct
this before installing mpd." 1>&2 exit 1
 fi
else
 echo "Adding user mpd UID=204."
 /usr/sbin/useradd \
   \
  -u 204 \
  -r \
  -d /home/services/mpd \
  -s /bin/false \
  -c "Music Player Daemon (MPD) user"\
  -g audio \
   \
  -G mpd \
  mpd 1>&2 || exit $?
 [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || :
fi;
postinstall scriptlet (using /bin/sh):
/sbin/chkconfig --add mpd
preuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
 {
if [ -f /var/lock/subsys/mpd ]; then
/sbin/service mpd stop 1>&2 || :;
fi }; /sbin/chkconfig --del httpd
fi
postuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
 /usr/lib/rpm/user_group.sh user del mpd
 /usr/lib/rpm/user_group.sh group del mpd
fi

PREUN is trying to remove httpd service don't know why and return 1
i think. It is stupid for me, but maybe i don't understand it.