Please allow jedstate_0.5.4.transitional.1-1 and
jed-extra_2.2.1-1.etch.1
Steve Langasek
vorlon at debian.org
Sun Feb 11 03:15:09 CET 2007
On Wed, Feb 07, 2007 at 11:17:24AM +0100, Rafael Laboissiere wrote:
> I just uploaded version 0.5.4.transitional.1-4 to unstable addressing the
> issues below. Notice that in this version I added the gdbmrecent-purge
> script, which can be used in the same way the old /usr/bin/jedstate was
> used. This improves the compatibility of the new package with the old one.
Thanks, this should just about be ready to go, but I just noticed this
problem with the postinst:
> I put the following working code in debian/postinst:
> dir=/etc/jed-init.d
> hook=99jedstate_hook.sl
> chksum=cc8dbd5ddce2ed276c2a8f1cf9cc378d
> test -f $dir/$hook \
> && echo "$chksum $dir/$hook" | md5sum -c >/dev/null 2>&1 \
> && rm -f $dir/$hook
> test -d $dir && rmdir --ignore-fail-on-non-empty $dir
Your postinst is run with set -e, but cmd1 && cmd2 will only return true if
both commands succeed. So while this shell code correctly short-circuits,
it also causes the postinst to exit non-zero whenever $dir/hook is absent or
has been modified, which doesn't seem to be the intent.
You probably want this instead:
if test -f $dir/$hook \
&& echo "$chksum $dir/$hook" | md5sum -c >/dev/null 2>&1
then
rm -f $dir/$hook
fi
if test -d $dir; then
rmdir --ignore-fail-on-non-empty $dir
fi
Sorry for not noticing this in my earlier review.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon at debian.org http://www.debian.org/
More information about the Pkg-jed-devel
mailing list