Hi again,

In January, Jonathan Nieder wrote:
> Robert Luberda wrote:

>>    * debian/postinst: set PERL_DL_NONLAZY=1 not to fail when perl is being
>>      upgraded (closes: #648937).
>>    * install-docs.in:
>>      + show verbose warning message when doc-base is not fully functional;
>
> Do you think it would be appropriate to apply these fixes to squeeze, too?

My feeling is that yes, these would be good changes for squeeze, to
make triggers smoother when upgrading squeeze->wheezy and to make the
lenny->squeeze upgrade smoother for those unfortunate souls who
haven't made the jump yet.  Here's a backport.  Sensible?

  Set PERL_DL_NONLAZY=1 variable in postinst to fix Bug#648937.
  Inform users when doc-base is not fully functional.

 debian/changelog | 10 ++++++++++
 debian/postinst  |  4 ++++
 install-docs.in  | 13 ++++++++++++-
 3 files changed, 26 insertions(+), 1 deletion(-)
From: Robert Luberda <rob...@debian.org>
Date: Wed, 16 Nov 2011 23:58:29 +0100
Subject: Set PERL_DL_NONLAZY=1 variable in postinst to fix Bug#648937.

commit 94db634989f908e9a838bed68ffdd5c19ac0bcc8 upstream.
---
 debian/changelog | 8 ++++++++
 debian/postinst  | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b5113e1f..82e63e60 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+doc-base (0.9.5+squeeze0.1) stable; urgency=low
+
+  [ Robert Luberda ]
+  * debian/postinst: set PERL_DL_NONLAZY=1 not to fail when perl is being
+    upgraded (closes: #648937).
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Mon, 22 Oct 2012 00:42:33 -0700
+
 doc-base (0.9.5) unstable; urgency=low
 
   * Add a `Typesetting' top-level section for software used to typesetting 
diff --git a/debian/postinst b/debian/postinst
index 8758def7..000d977f 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -20,6 +20,10 @@ if [ "$DEBUG" ]; then
 fi
 
 reinstall_docs () {
+    # Set the following env variable to fix `Bug#648937: doc-base: trigger 
fails when
+    # Locale::gettext is broken due to perl upgrade'.  See also #479711 & 
#479681.
+    export PERL_DL_NONLAZY=1
+
     install-docs ${VERBOSE} "--install-$1"
 }
 
-- 
1.8.0

From: Robert Luberda <rob...@debian.org>
Date: Thu, 17 Nov 2011 22:13:58 +0100
Subject: Inform users when doc-base is not fully functional.

commit 3f2dedee1e1e6b7cea57b9a46769bc1b74705354 upstream.

Make the error message shown when doc-base modules
cannot be loaded more verbose.
---
 debian/changelog |  2 ++
 install-docs.in  | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 82e63e60..cac0b3e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ doc-base (0.9.5+squeeze0.1) stable; urgency=low
   [ Robert Luberda ]
   * debian/postinst: set PERL_DL_NONLAZY=1 not to fail when perl is being
     upgraded (closes: #648937).
+  * install-docs.in: show verbose warning message when doc-base is not
+    fully functional.
 
  -- Jonathan Nieder <jrnie...@gmail.com>  Mon, 22 Oct 2012 00:42:33 -0700
 
diff --git a/install-docs.in b/install-docs.in
index 57e23c0e..e908655c 100755
--- a/install-docs.in
+++ b/install-docs.in
@@ -36,7 +36,18 @@ BEGIN {
                               import  Debian::DocBase::Gettext;
                               1;
                         };
-  warn $@ if $@;
+  if ($@) {
+    # gettext is most probably not usable here.
+    warn "The following error has occured while loading doc-base modules:\n\n".
+         $@ ."\n".
+         
"*******************************************************************\n".
+         "It seems install-docs is not fully functional at the moment,\n".
+         "and it will try to recover from the error next time it is called.\n".
+         ($ENV{'DPKG_MAINTSCRIPT_PACKAGE'} ?
+         "\nPlease run `install-docs --install-changed' command\n".
+         "manually after the upgrade process is finished.\n" : "") .
+         
"*******************************************************************\n\n";
+  }
 }
 
 =head1 NAME
-- 
1.8.0

Reply via email to