On Thu, Nov 17, 2011 at 09:02:55AM +0000, 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.000000000 +0100 +++ doc-base-0.10.2ubuntu1/debian/control 2011-11-17 14:20:49.000000000 +0000 @@ -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.000000000 +0100 +++ doc-base-0.10.2ubuntu1/perl/Debian/DocBase/Programs/Scrollkeeper.pm 2011-11-17 14:15:51.000000000 +0000 @@ -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($@) { # {{{ my $showinfo = shift; -- 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