Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Puppet_Master (fa43742aba1a2c75613c863c5844aa8fc095afe7)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Remko van der Vossen <wich AT stack.nl>
  • To: Puppet_Master <puppetmaster.e17 AT gmail.com>
  • Cc: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Puppet_Master (fa43742aba1a2c75613c863c5844aa8fc095afe7)
  • Date: Fri, 22 Jun 2007 00:46:59 +0200

On Wed, Jun 20, 2007 at 06:17:32PM -0500, Puppet_Master wrote:
> Updating mpd spell to could run MPD like a service. Bug #13651
>
> diff --git a/audio-players/mpd/FINAL b/audio-players/mpd/FINAL
> +if [[ $INIT_INSTALLED ]]; then

Is FINAL run when using telinit spellinstall <spell>? If it isn't it
would be possible to install the init script without the required files.

> + I_R=${INSTALL_ROOT} &&
> + USRBIN=${I_R}/usr/bin &&

Why use I_R if you only use it once? In fact why use anything else than
INSTALL_ROOT anyway, it only makes things more difficult to read.

> + MPD_HOME="/var/lib/mpd" &&

In my opinion it would be better to call it MPD_LIB or MPD_STORE in
order to differentiate it from an actual home diretory.

> +fi

The mpd.conf file is never installed, so right now the spell change is
pointless. In case this was intentional, note that works in progress
should be committed to devel instead of master (right guys?), everything
in master should be working.

> diff --git a/audio-players/mpd/init.d/mpd b/audio-players/mpd/init.d/mpd
> +#. /etc/sysconfig/gpm

Why include this in the init script?

> +ARGS=""

ARGS should of course include the config file path.

> +[[ -z "/var/lib/mpd/mpd.db" ]] && ARGS="--create-db"

Always use ARGS="$ARGS ..." in such cases, even if you previously
declared ARGS empty. It precludes the possibility of bugs cropping up
when the initial ARGS assignment is changed.

One final thing, you are not supposed to use tabs in spells in any file
except the HISTORY file.
(http://wiki.sourcemage.org/Things_Spells_Should_Not_Do)

Regards,

Remko van der Vossen.

Attachment: pgpvFjnF4npAB.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page