Bug#658702: libxml-sax-perl: update-perl-sax-parsers sometimes fails when called from old-prerm during squeeze->wheezy update

Niko Tyni ntyni at debian.org
Sun Feb 5 13:23:56 UTC 2012


On Sun, Feb 05, 2012 at 01:37:54PM +0100, Andreas Beckmann wrote:
> Package: libxml-sax-perl
> Version: 0.99+dfsg-1
> Severity: normal
 
>   Preparing to replace libxml-libxml-perl 1.70.ds-1 (using .../libxml-libxml-perl_1.88+dfsg-1+b1_amd64.deb) ...
>   Can't locate File/Basename.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/perl5/XML/SAX.pm line 15.
>   BEGIN failed--compilation aborted at /usr/share/perl5/XML/SAX.pm line 15.
>   Compilation failed in require at /usr/bin/update-perl-sax-parsers line 18.
>   BEGIN failed--compilation aborted at /usr/bin/update-perl-sax-parsers line 18.
>   dpkg: warning: subprocess old pre-removal script returned error exit status 2
>   dpkg - trying script from the new package instead ...
>   dpkg: ... it looks like that went OK.
>   Unpacking replacement libxml-libxml-perl ...
> 
> This is not harmful as the installation succeeds, but eventually some
> dependencies can be tightened to avoid this problem and noise.

I don't think it can be fixed by tightening dependencies.

This happens in the 'old-prerm upgrade' phase if perl/perl-modules and
perl-base are out of sync.

Functionality from non-essential packages is not guaranteed to be working
in such a phase. Even a Pre-Depends entry wouldn't help IIRC.

I think the options are

- fix update-perl-sax-parsers to only use modules from perl-base (unlikely?)
- fix update-perl-sax-parsers to fail more gracefully in such a situation
- stop invoking update-perl-sax-parsers in 'old-prerm upgrade'
  * this doesn't help squeeze->wheezy anymore but it would fix the
    issue for future upgrades
  * at least libxml-sax-expat-perl already only invokes the update script
    on removals, not upgrades

I'm not sure if update-perl-sax-parsers is always idempotent, ie. if
an upgrade where "update-perl-sax-parsers --remove" fails but a later
"update-perl-sax-parsers --add" call succees will leave double entries
in ParserDetails.ini. Quick tests do not show any double entries FWIW,
so the "fail more gracefully" option seems possible.

If somebody does implement this, please file a bug against perl afterwards
so we can add a Conflicts or Breaks entry against the old version.
(See #657940 for a related case.)
-- 
Niko Tyni   ntyni at debian.org





More information about the pkg-perl-maintainers mailing list