tags 414292 + patch
thanks

Hi,

    Attached is a patch to fix the postinst and postrm for this package
to use, firstly to use /bin/sh, since you don't use any bash-specific
features, secondly to make use of set -e, and thirdly to utilise
getent group to test if the group exists. In other news, I'm completly
unsure as why this package has depends on ${shlibs:Depends}, 
${misc:Depends}, diff, sed, grep util-linux, since the four packages
in question are all Essential: yes, and both of the substvars expand
to nothing, so the patch removes them.

Thanks,

-- System Information:
Debian Release: testing/unstable
  APT prefers edgy-updates
  APT policy: (500, 'edgy-updates'), (500, 'edgy-security'), (500, 'edgy')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.17-11-generic
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)

-- 
                                        Steve
<bob2> joy hasn't spoken on IRC in 45 seconds, he must be MIA!
--- list-2.0.0/debian/control~  2007-03-24 15:26:16.000000000 +1100
+++ list-2.0.0/debian/control   2007-03-24 15:26:17.000000000 +1100
@@ -8,7 +8,7 @@
 
 Package: list
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.3), diff (>= 2.7), 
sed (>= 4.1), grep (>= 2.5.1), util-linux (>=2.12), adduser
+Depends: python (>= 2.3), adduser
 XB-Python-Version: ${python:Versions}
 Description: Linux Statistics Client
  This is a client for the Linux Statistics Project. It collects information
--- list-2.0.0/debian/list.postinst~    2007-03-24 15:26:16.000000000 +1100
+++ list-2.0.0/debian/list.postinst     2007-03-24 15:26:17.000000000 +1100
@@ -1,9 +1,13 @@
-#!/bin/bash
-# Here is created the group `stats'...
-stats=`grep stats /etc/group 2>/dev/null`
-if [ "${stats}" == ""  ]; then
+#!/bin/sh
+
+set -e
+
+if ! $(getent group stats >/dev/null); then
        addgroup --system stats 
 fi
-chgrp -R stats /etc/list && chmod -R g+w /etc/list
+
+chgrp -R stats /etc/list
+chmod -R g+w /etc/list
 chgrp stats /etc/cron.daily/list.cronjob
+
 #DEBHELPER#
--- list-2.0.0/debian/list.postrm~      2007-03-24 15:26:16.000000000 +1100
+++ list-2.0.0/debian/list.postrm       2007-03-24 15:26:17.000000000 +1100
@@ -1,9 +1,9 @@
-#!/bin/bash
-# Here is erased `stats' group
-stats=`grep stats /etc/group 2>/dev/null`
-if [ "${stats}" == ""  ]; then
-       echo Dont exist stats group     
-else
+#!/bin/sh
+
+set -e
+
+if $(getent group stats >/dev/null); then
        groupdel stats
 fi
+
 #DEBHELPER#

Reply via email to