[SCM] Debian package checker branch, master, updated. 2.3.3-57-g3526769
The following commit has been merged in the master branch:
commit 35267691a1bb537db6ea1c817f702ce9264a4e08
Author: Raphael Geissert <atomo64@gmail.com>
Date: Sun Mar 21 01:51:47 2010 -0600
Use triggers to ensure an up-to-date locale in all cases
* debian/postinst:
+ [RG] Use triggers to ensure an up-to-date locale in all cases.
(Closes: #567451)
diff --git a/debian/changelog b/debian/changelog
index c604351..e869e52 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -88,6 +88,9 @@ lintian (2.3.4) UNRELEASED; urgency=low
instead of 3.8.3. Should have been done on the previous release.
* debian/source/format:
+ [RA] Switch package format to 3.0 (native).
+ * debian/postinst:
+ + [RG] Use triggers to ensure an up-to-date locale in all cases.
+ (Closes: #567451)
* frontend/lintian:
+ [RA] Globally ignore SIGPIPE, forcing error return codes from write.
diff --git a/debian/postinst b/debian/postinst
index 769ffea..fd7c783 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,19 +3,40 @@
# Lintian requires a UTF-8 locale in order to properly do man page tests.
# Generate one at installation time so that we're guaranteed to have one.
-set -e
+set -eu
-if [ ! -f '/var/lib/lintian/locale/en_US.UTF-8/LC_CTYPE' ] &&
- [ -f /usr/share/locale/locale.alias ]; then
+locale_dir=/var/lib/lintian/locale
+
+gen_locale() {
echo 'Generating en_US.UTF-8 locale for internal Lintian use....'
- # handle upgrades from the previous, incorrect, directory
- rm -rf /var/lib/lintian/locale
- mkdir -p /var/lib/lintian/locale
+ mkdir -p "$locale_dir"
if ! localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias \
- --quiet /var/lib/lintian/locale/en_US.UTF-8 ; then
- rm -rf /var/lib/lintian/locale
+ --quiet "$locale_dir"/en_US.UTF-8 ; then
+ rm -rf "$locale_dir"
exit 1
fi
+}
+
+if [ "$1" = "configure" ]; then
+ if [ ! -f "$locale_dir/en_US.UTF-8/LC_CTYPE" ] &&
+ [ -f /usr/share/locale/locale.alias ]; then
+
+ # handle upgrades from the previous, incorrect, directory:
+ rm -rf "$locale_dir"
+ gen_locale
+ fi
+fi
+
+if [ "$1" = "triggered" ]; then
+ # Remove our locale directory in all cases:
+ # If locales is removed, locales-all should provide us the locale
+ # we want.
+ # If locales is upgraded, we should still regenerate our locale.
+ rm -rf "$locale_dir"
+
+ if [ -f /usr/share/locale/locale.alias ]; then
+ gen_locale
+ fi
fi
#DEBHELPER#
diff --git a/debian/triggers b/debian/triggers
new file mode 100644
index 0000000..d921082
--- /dev/null
+++ b/debian/triggers
@@ -0,0 +1,2 @@
+interest /usr/share/locale/locale.alias
+interest /usr/lib/locales-all
--
Debian package checker
Reply to: