Hi again!
* Daniel Baumann <[email protected]> [2009-03-06 10:26:36 CET]:
> Gerfried Fuchs wrote:
> > The package installation scripts should avoid producing output which
> > is unnecessary for the user to see
>
> i consider it necessary, ymmv.
In the hope that you would like a patch I produced the following:
#v+
diff -u gitosis-0.2+20080825/debian/gitosis.postinst
gitosis-0.2+20080825/debian/gitosis.postinst
--- gitosis-0.2+20080825/debian/gitosis.postinst
+++ gitosis-0.2+20080825/debian/gitosis.postinst
@@ -30,7 +30,9 @@
then
adduser --system --home ${_DIRECTORY} --shell /bin/sh
--disabled-password --no-create-home --gecos 'git repository hosting' --group
${_USERNAME}
else
- echo "gitosis user (${_USERNAME}) already exists, doing
nothing."
+ if [ -n "$DEBUG" ] ; then
+ echo "gitosis user (${_USERNAME}) already
exists, doing nothing."
+ fi
fi
if [ ! -d "${_DIRECTORY}" ]
@@ -56,14 +58,18 @@
fi
fi
else
- echo
- echo "gitosis directory (${_DIRECTORY}) already exists,
doing nothing."
- echo "Make sure the directory is recursively owned by
the correct user account (${_USERNAME})."
+ if [ "$DEBUG" ]; then
+ echo
+ echo "gitosis directory (${_DIRECTORY}) already
exists, doing nothing."
+ echo "Make sure the directory is recursively
owned by the correct user account (${_USERNAME})."
+ fi
fi
- echo
- echo "Please read /usr/share/doc/gitosis/README.Debian"
- echo "for information about how to use gitosis."
+ if [ "$DEBUG" ]; then
+ echo
+ echo "Please read /usr/share/doc/gitosis/README.Debian"
+ echo "for information about how to use gitosis."
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -u gitosis-0.2+20080825/debian/changelog
gitosis-0.2+20080825/debian/changelog
--- gitosis-0.2+20080825/debian/changelog
+++ gitosis-0.2+20080825/debian/changelog
@@ -1,3 +1,10 @@
+gitosis (0.2+20080825-15.1) unstable; urgency=low
+
+ [ Gerfried Fuchs ]
+ * Check for $DEBUG when sending out debug informations (closes: #518307)
+
+ -- Gerfried Fuchs <[email protected]> Wed, 26 Aug 2009 21:24:23 +0200
+
gitosis (0.2+20080825-15) unstable; urgency=low
* Using correct rfc-2822 date formats in changelog.
#v-
The approach with using the DEBUG environment variable is used by quite
some packages. I did some investigations on this and this is the most
used variable, some packages use to use package specific debugging
variables in their scripts.
Thanks in advance for considering including it,
Rhonda
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]