[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.4-163-g3a0753a



The following commit has been merged in the master branch:
commit 3a0753af793587fdbd243a5e22dc25af22ba7e54
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Feb 10 10:53:43 2012 +0100

    Remove internal locale on upgrade/trigger if no longer needed
    
    Added a trigger on /usr/lib/locale/C.UTF-8 locale to catch cases like
    libc-bin being upgraded to 2.13 after Lintian 2.5.5.  Prefer libc-bin
    (>= 2.13) to locales in dependencies.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/debian/changelog b/debian/changelog
index 7aae8f9..97b97de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -165,6 +165,18 @@ lintian (2.5.5) UNRELEASED; urgency=low
     + [NT] Auto-generate file with help from dpkg-architecture.
       (Closes: #653832)
 
+  * debian/control:
+    + [NT] Prefer libc-bin (>= 2.13) to locales.  Thanks to Josh
+      Triplett for the suggestion, investigative work and the
+      proposed patch to make this possible.  (Closes: #636086)
+  * debian/{postinst,prerm}:
+    + [JW,NT] Remove the internal Lintian locale if a C.UTF-8 locale
+      is found in /usr/lib/locale.
+  * debian/triggers:
+    + [JW] Added trigger for libc-bin C.UTF-8 locale.  This ensures
+      the internal Lintian locale can removed if libc-bin is upgraded
+      after Lintian.
+
   * doc/lintian.xml:
     + [NT] Corrected the runtime estimate for an archive-wide run.
       With 35 000+ packages, it can no longer be done in "a few
@@ -260,6 +272,10 @@ lintian (2.5.5) UNRELEASED; urgency=low
       unknown architectures and for "arch:all" packages.
     + [NT] Use a Profile to determine if a tag is suppressed or not.
     + [NT] Handle "pedantic" like the other severities.
+  * lib/Util.pm:
+    + [NT] Create clean_env function to handle cleaning of the
+      environment for children processes and finding a suitable UTF-8
+      locale (when needed).
 
   * man/lintian.pod.in:
     + [NT] Removed the notes that some options disable loading of a
diff --git a/debian/control b/debian/control
index 5d9bb66..2e79673 100644
--- a/debian/control
+++ b/debian/control
@@ -22,6 +22,7 @@ Build-Depends: binutils,
                intltool-debian,
                javahelper (>= 0.32~),
                libapt-pkg-perl,
+               libc-bin (>= 2.13) | locales,
                libclass-accessor-perl,
                libclone-perl,
                libdpkg-perl,
@@ -38,7 +39,6 @@ Build-Depends: binutils,
                libtext-template-perl,
                libtimedate-perl,
                liburi-perl,
-               locales,
                xz-lzma | lzma,
                man-db,
                patchutils,
@@ -62,6 +62,7 @@ Depends: binutils,
          gettext,
          intltool-debian,
          libapt-pkg-perl,
+         libc-bin (>= 2.13) | locales,
          libclass-accessor-perl,
          libclone-perl,
          libdigest-sha-perl,
@@ -71,7 +72,6 @@ Depends: binutils,
          libparse-debianchangelog-perl,
          libtimedate-perl,
          liburi-perl,
-         locales,
          man-db,
          patchutils,
          perl,
diff --git a/debian/postinst b/debian/postinst
index fd7c783..bf64725 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -19,11 +19,15 @@ gen_locale() {
 
 if [ "$1" = "configure" ]; then
     if [ ! -f "$locale_dir/en_US.UTF-8/LC_CTYPE" ] &&
-	[ -f /usr/share/locale/locale.alias ]; then
+	[ -f /usr/share/locale/locale.alias ] &&
+	[ ! -d /usr/lib/locale/C.UTF-8/ ] ; then
 
 	# handle upgrades from the previous, incorrect, directory:
 	rm -rf "$locale_dir"
 	gen_locale
+    elif [ -d "$locale_dir" -a -d /usr/lib/locale/C.UTF-8/ ] ; then
+        # handle upgrades into a system with the libc C.UTF-8
+        rm -rf "$locale_dir"
     fi
 fi
 
@@ -32,9 +36,13 @@ if [ "$1" = "triggered" ]; then
     # If locales is removed, locales-all should provide us the locale
     # we want.
     # If locales is upgraded, we should still regenerate our locale.
+    # If the libc provided C.UTF-8 appeared, we do not need our locale
+    # anymore.
     rm -rf "$locale_dir"
 
-    if [ -f /usr/share/locale/locale.alias ]; then
+    if [ -f /usr/share/locale/locale.alias ] &&
+	[ ! -d /usr/lib/locale/C.UTF-8/ ] ; then
+
 	gen_locale
     fi
 fi
diff --git a/debian/prerm b/debian/prerm
index 698ed52..76f97cb 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -3,9 +3,11 @@
 set -e
 
 #
-# Remove our generated locale unless we're only upgrading.
+# Remove our generated locale if we are not upgrading or
+# we are upgrading into a system with a libc provided
+# C.UTF-8 (libc-bin >= 2.13)
 
-if [ 'upgrade' != "$1" ] ; then
+if [ 'upgrade' != "$1" -o -d '/usr/lib/locale/C.UTF-8/' ] ; then
     rm -rf /var/lib/lintian/
 fi
 
diff --git a/debian/triggers b/debian/triggers
index d921082..4cdecc2 100644
--- a/debian/triggers
+++ b/debian/triggers
@@ -1,2 +1,3 @@
 interest /usr/share/locale/locale.alias
 interest /usr/lib/locales-all
+interest /usr/lib/locale/C.UTF-8

-- 
Debian package checker


Reply to: