Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
Hi Robert, 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? Thanks, Jonathan (in hope of a less buggy stable, but with no opinion on this particular bug) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
Robert Luberda pisze: Hi, > > The message you saw if printed by 'warn $@ if $@;'. It might be a bit > misleading to users, I'm thinking about changing it in the way that make > it obvious that it's not a real error message. I've changed the message into: The following error has occured while loading doc-base modules: Can't load '/usr/lib/perl5/auto/UUID/UUID.so' for module UUID: /usr/lib/perl5/auto/UUID/UUID.so: undefined symbol: Perl_Imarkstack_ptr_ptr at /usr/lib/perl/5.14/DynaLoader.pm line 184. at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21 Compilation failed in require at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21. BEGIN failed--compilation aborted at /usr/share/perl5/Debian/DocBase /Programs/Scrollkeeper.pm line 21. Compilation failed in require at /usr/share/perl5/Debian/DocBase/InstallDocs.pm line 25. BEGIN failed--compilation aborted at /usr/share/perl5/Debian/DocBase/InstallDocs.pm line 25. Compilation failed in require at /usr/sbin/install-docs line 28. *** It seems install-docs is not fully functional at the moment, and it will try to recover from the error next time it is called. Please run `install-docs --install-changed' command manually after the upgrade process is finished. *** Regards, robert -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
Hi, > > # PERL_DL_NONLAZY=1 install-docs --install-changed > Can't load '/usr/lib/perl5/auto/UUID/UUID.so' for module UUID: > /usr/lib/perl5/auto/UUID/UUID.so: undefined symbol: Perl_Imarkstack_ptr_ptr > at /usr/lib/perl/5.14/DynaLoader.pm line 184. >at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21 > Compilation failed in require at > /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21. > BEGIN failed--compilation aborted at > /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21. As you can see the message here is different than the one in https://bugs.launchpad.net/ubuntu/+source/doc-base/+bug/891257 The UUID module is imported by Debian::DocBase::Programs::Scrollkeeper inside eval block (see http://anonscm.debian.org/gitweb/?p=users/robert/doc-base.git;a=blob;f=install-docs.in;hb=198fa3f3e55f8d82e2807d986f50e5a699ddd1d3#l28) If the eval block fails, install-docs creates a special /var/lib/doc-base/info/FORCE-REREGISTER.flag file, and exits with error code 0 so it should not affect upgrades. The existance of the file should cause install-docs to re-register all documents next time install-docs is called. The message you saw if printed by 'warn $@ if $@;'. It might be a bit misleading to users, I'm thinking about changing it in the way that make it obvious that it's not a real error message. > The extra dependency on uuid-runtime is unfortunate, but necessary with > this approach (and calling out to uuidgen probably is slower with lots scrollkeeper-gen-seriesid from rarian-compat can be used instead. doc-base already suggests rarian-compat and won't call GenUUID() in case the package is not installed. However the issue is that doc-base doesn't work with rarian-compat at all (see #546208), so maybe dropping support for it from doc-base would be a better option than trying to ensure the DocBase::Scrollkeeper module remains usable on perl upgrades. Regards, robert -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
On Thu, Nov 17, 2011 at 09:02:55AM +, Colin Watson wrote: > On Wed, Nov 16, 2011 at 10:33:45AM +0100, Raphaël Hertzog wrote: > > Traitement des actions différées (« triggers ») pour « doc-base »... > > /usr/bin/perl: symbol lookup error: > > /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: > > Perl_Gthr_key_ptr > > dpkg : erreur de traitement de doc-base (--triggers-only) : > > le sous-processus script post-installation installé a retourné une erreur > > de sortie d'état 127 > > A similar problem bites doc-base's use of libuuid-perl. See: > > https://bugs.launchpad.net/ubuntu/+source/doc-base/+bug/891257 Indeed, I have established that PERL_DL_NONLAZY=1 is not a sufficient fix for this problem in the case of libuuid-perl, because it doesn't have any fallback code for that module being non-importable. It was quite difficult to set up a suitable reproduction environment, but what I did was as follows: 1) Install an Ubuntu oneiric chroot with the addition of the doc-base, rarian-compat, and libsignatures-perl packages. (Remember to divert /sbin/initctl and replace it with a symlink to /bin/true.) 2) 'dpkg-divert --rename /usr/bin/dpkg', and replace /usr/bin/dpkg with the following script: #! /bin/sh set -e if grep -q 'perl-base.*5\.14' /var/log/dpkg.log; then sleep 3600 || true fi exec dpkg.distrib "$@" 3) Replace 'oneiric' with 'precise' in /etc/apt/sources.list and run 'apt-get update && apt-get dist-upgrade'. 4) The upgrade should pause immediately after perl-base is configured. When this happens, start a different shell in the same chroot (don't suspend the one running apt-get) and run 'PERL_DL_NONLAZY=1 install-docs --install-changed'. # install-docs --install-changed /usr/bin/perl: symbol lookup error: /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: Perl_Gthr_key_ptr # PERL_DL_NONLAZY=1 install-docs --install-changed Can't load '/usr/lib/perl5/auto/UUID/UUID.so' for module UUID: /usr/lib/perl5/auto/UUID/UUID.so: undefined symbol: Perl_Imarkstack_ptr_ptr at /usr/lib/perl/5.14/DynaLoader.pm line 184. at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21 Compilation failed in require at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21. BEGIN failed--compilation aborted at /usr/share/perl5/Debian/DocBase/Programs/Scrollkeeper.pm line 21. Compilation failed in require at /usr/share/perl5/Debian/DocBase/InstallDocs.pm line 25. BEGIN failed--compilation aborted at /usr/share/perl5/Debian/DocBase/InstallDocs.pm line 25. Compilation failed in require at /usr/sbin/install-docs line 28. I suggest the following patch. I think perl-base would then have to bump its versioned Breaks on doc-base to force this new version to be installed? The extra dependency on uuid-runtime is unfortunate, but necessary with this approach (and calling out to uuidgen probably is slower with lots of documents, so it's worthwhile trying to work in-process if possible). Better ideas appreciated; something that only used core Perl would be cleaner. * Call uuidgen if UUID.pm cannot be imported, such as during a major version upgrade of Perl. diff -Nru doc-base-0.10.2/debian/control doc-base-0.10.2ubuntu1/debian/control --- doc-base-0.10.2/debian/control 2011-07-01 21:45:51.0 +0100 +++ doc-base-0.10.2ubuntu1/debian/control 2011-11-17 14:20:49.0 + @@ -12,7 +12,7 @@ Vcs-Browser: http://anonscm.debian.org/git/users/robert/doc-base.git Package: doc-base -Depends: libuuid-perl, libyaml-tiny-perl, ${misc:Depends}, ${perl:Depends} +Depends: libuuid-perl, uuid-runtime, libyaml-tiny-perl, ${misc:Depends}, ${perl:Depends} Suggests: dhelp | dwww | doc-central | yelp | khelpcenter4, rarian-compat Architecture: all Description: utilities to manage online documentation diff -Nru doc-base-0.10.2/perl/Debian/DocBase/Programs/Scrollkeeper.pm doc-base-0.10.2ubuntu1/perl/Debian/DocBase/Programs/Scrollkeeper.pm --- doc-base-0.10.2/perl/Debian/DocBase/Programs/Scrollkeeper.pm 2011-07-01 21:45:51.0 +0100 +++ doc-base-0.10.2ubuntu1/perl/Debian/DocBase/Programs/Scrollkeeper.pm 2011-11-17 14:15:51.0 + @@ -18,7 +18,28 @@ use Debian::DocBase::Utils; use Debian::DocBase::Gettext; use Debian::DocBase::DB; -use UUID; + +BEGIN { + eval 'use UUID'; + if ($@) { +eval q{ + sub _GetUUID() { +chomp (my $retval = `uuidgen`); +return $retval; + } +}; + } + else { +eval q{ + sub _GetUUID() { +my ($uuid, $retval); +UUID::generate($uuid); +UUID::unparse($uuid, $retval); +return $retval; + } +}; + } +} @@ -50,13 +71,6 @@ our %mapping = (undef=>undef); -sub _GetUUID() { # {{{ - my ($uuid, $retval); - UUID::generate($uuid); - UUID::unparse($uuid, $retval); - return $retval; -} # }}} - sub RegisterScrollkeeper($@) { # {{{
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
On Wed, Nov 16, 2011 at 10:33:45AM +0100, Raphaël Hertzog wrote: > Traitement des actions différées (« triggers ») pour « doc-base »... > /usr/bin/perl: symbol lookup error: > /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: > Perl_Gthr_key_ptr > dpkg : erreur de traitement de doc-base (--triggers-only) : > le sous-processus script post-installation installé a retourné une erreur de > sortie d'état 127 A similar problem bites doc-base's use of libuuid-perl. See: https://bugs.launchpad.net/ubuntu/+source/doc-base/+bug/891257 -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
tags 648937 pending thanks Raphaël Hertzog pisze: > > A work-around is to set $ENV{PERL_DL_NONLAZY} = 1 and to intercept the > failure to load Locale::gettext and put compatibility stubs in that case. > See for example how Dpkg::Gettext does it. Debian::DocBase::Gettext is quite similar to Dpkg::Gettext. I wasn't aware of PERL_DL_NONLAZY, though. After having done some tests yesterday, I think that exporting this variable in doc-base's postinst script would be sufficient fix for this issue. I'll upload a fixed package tonight (CET time). Regards, robert -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648936: Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
On Wed, Nov 16, 2011 at 10:33:45AM +0100, Raphaël Hertzog wrote: > Package: doc-base > Version: 0.10.2 > Severity: serious > > Sorry I only have the log in French but you can translate: > - Préparation du remplacement -> Preparing to replace > - Dépaquetage de la mise à jour -> Unpacking update > - Paramétrage -> Configuring > - Traitement des actions différées pour -> Processing trigger for > > Préparation du remplacement de perl-doc 5.12.4-6 (en utilisant > .../perl-doc_5.14.2-3_all.deb) ... > Conservation de « détournement de /usr/bin/perldoc en /usr/bin/perldoc.stub > par perl-doc » > Dépaquetage de la mise à jour de perl-doc ... > Préparation du remplacement de libdevel-cover-perl 0.77-1+b2 (en utilisant > .../libdevel-cover-perl_0.77-1+b3_i386.deb) ... > Dépaquetage de la mise à jour de libdevel-cover-perl ... > Préparation du remplacement de perl 5.12.4-6 (en utilisant > .../perl_5.14.2-3_i386.deb) ... > Dépaquetage de la mise à jour de perl ... > Selecting previously unselected package libperl5.14. > Dépaquetage de libperl5.14 (à partir de .../libperl5.14_5.14.2-3_i386.deb) ... > [...] > Dépaquetage de la mise à jour de perl-base ... > Paramétrage de perl-base (5.14.2-3) ... > Traitement des actions différées (« triggers ») pour « menu »... > Traitement des actions différées (« triggers ») pour « desktop-file-utils »... > Traitement des actions différées (« triggers ») pour « man-db »... > Traitement des actions différées (« triggers ») pour « doc-base »... > /usr/bin/perl: symbol lookup error: > /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: > Perl_Gthr_key_ptr > dpkg : erreur de traitement de doc-base (--triggers-only) : > le sous-processus script post-installation installé a retourné une erreur de > sortie d'état 127 This has also been reported as #648936 in liblocale-gettext-perl; not merging now until we decide what's the best course of action. -- Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5 from the.earth.li (keyserver,web,email) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#648937: doc-base: trigger fails when Locale::gettext is broken due to perl upgrade
Package: doc-base Version: 0.10.2 Severity: serious Sorry I only have the log in French but you can translate: - Préparation du remplacement -> Preparing to replace - Dépaquetage de la mise à jour -> Unpacking update - Paramétrage -> Configuring - Traitement des actions différées pour -> Processing trigger for Préparation du remplacement de perl-doc 5.12.4-6 (en utilisant .../perl-doc_5.14.2-3_all.deb) ... Conservation de « détournement de /usr/bin/perldoc en /usr/bin/perldoc.stub par perl-doc » Dépaquetage de la mise à jour de perl-doc ... Préparation du remplacement de libdevel-cover-perl 0.77-1+b2 (en utilisant .../libdevel-cover-perl_0.77-1+b3_i386.deb) ... Dépaquetage de la mise à jour de libdevel-cover-perl ... Préparation du remplacement de perl 5.12.4-6 (en utilisant .../perl_5.14.2-3_i386.deb) ... Dépaquetage de la mise à jour de perl ... Selecting previously unselected package libperl5.14. Dépaquetage de libperl5.14 (à partir de .../libperl5.14_5.14.2-3_i386.deb) ... [...] Dépaquetage de la mise à jour de perl-base ... Paramétrage de perl-base (5.14.2-3) ... Traitement des actions différées (« triggers ») pour « menu »... Traitement des actions différées (« triggers ») pour « desktop-file-utils »... Traitement des actions différées (« triggers ») pour « man-db »... Traitement des actions différées (« triggers ») pour « doc-base »... /usr/bin/perl: symbol lookup error: /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: Perl_Gthr_key_ptr dpkg : erreur de traitement de doc-base (--triggers-only) : le sous-processus script post-installation installé a retourné une erreur de sortie d'état 127 In general it's not safe to use Locale::gettext in any maintainer script. It has been the source of numerous failures in the past. Cf http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=479681 A work-around is to set $ENV{PERL_DL_NONLAZY} = 1 and to intercept the failure to load Locale::gettext and put compatibility stubs in that case. See for example how Dpkg::Gettext does it. This breaks upgrade so I put a serious severity. I also CC debian-perl for information. Note that my APT is setup with some custom parameters (which are supposed to become the default at some point in the future). // Trigger deferred DPkg::NoTriggers "true"; PackageManager::Configure "smart"; DPkg::ConfigurePending "true"; DPkg::TriggersPending "true"; -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages doc-base depends on: ii libuuid-perl 0.02-4+b1 ii libyaml-tiny-perl 1.50-1 doc-base recommends no packages. Versions of packages doc-base suggests: ii rarian-compat 0.8.1-5 ii yelp 3.2.1+dfsg-1+b1 -- debconf-show failed -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org