Bug#826993: libcss-dom-perl: FTBFS on stable: t/charset.t test failure

gregor herrmann gregoa at debian.org
Sat Jun 11 00:09:54 UTC 2016


Control: fixed -1 0.16-1
Control: forwarded -1 https://rt.cpan.org/Public/Bug/Display.html?id=107221
Control: tag -1 + upstream fixed-upstream patch

On Sat, 11 Jun 2016 00:31:51 +0100, Dominic Hargreaves wrote:

> Source: libcss-dom-perl
> Version: 0.15-1
> Severity: serious
> Justification: FTBFS
> 
> This package FTBFS on stable:
> 
> # "utf-16" is encoded in UCS-2-LE but is not UCS-2-LE-based
> Can't call method "cssText" on an undefined value at t/charset.t line 144.
> # Looks like you planned 23 tests but ran 9.
> # Looks like your test exited with 2 just after 9.
> t/charset.t .......................... 
> Dubious, test returned 2 (wstat 512, 0x200)
> Failed 14/23 subtests 
> 
> The full build log can be found here:
> 
> http://perl.debian.net/rebuild-logs/jessie/libcss-dom-perl_0.15-1/libcss-dom-perl_0.15-1_amd64-20160610-0308.build

Some quick tests show:
- 0.15-1 fails in stable, testing, and unstable chroots
- 0.16-1 passes in stable, testing, and unstable chroots

The diff between 0.15 and 0.16 shows:

+0.16    29 November, 2015
+      • Work  around  an  incompatible  change  in  Encode  2.77  (RT
+        #107221, #107043).

diff --git a/lib/CSS/DOM/Parser.pm b/lib/CSS/DOM/Parser.pm
index 7c2156e..8eb5c1d 100644
--- a/lib/CSS/DOM/Parser.pm
+++ b/lib/CSS/DOM/Parser.pm
@@ -1,6 +1,6 @@
 package CSS::DOM::Parser;

-$VERSION = '0.15';
+$VERSION = '0.16';

 use strict; use warnings; no warnings qw 'utf8 parenthesis';
 use re 'taint';
@@ -578,7 +578,7 @@ sub _decode { my $at; for(''.shift) {
        ) {
                my $origenc = my $enc = Encode::decode('utf16le', $2);
                my $dec = eval{Encode::decode($enc, $1, 9)};
-               defined $dec or $dec
+               !defined $dec || $dec !~ /^\@/ and $dec
                        = eval{Encode::decode($enc.='-le', $1, 9)};
                if(defined $dec) {
                        $dec eq "\@charset \"$origenc\";"
@@ -638,7 +638,7 @@ sub _decode { my $at; for(''.shift) {
        ) {
                my $origenc = my $enc = Encode::decode('utf32le', $2);
                my $dec = eval{Encode::decode($enc, $1, 9)};
-               defined $dec or $dec
+               !defined $dec || $dec !~ /^\@/ and $dec
                        = eval{Encode::decode($enc.='-le', $1, 9)};
                if(defined $dec) {
                        $dec eq "\@charset \"$origenc\";"


With this change, the tests pass in stable.
(Unsurprisingly, since this is the only difference between 0.15 and 0.16.)


(What surprises me is how a fix for Encode 2.77 works, if perl 5.20.2
ships Encode 2.60. And libencode-perl isn't installed; but that would
be 2.63 in stable.)


Cheers,
gregor


-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Star Trek: The Next Generation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160611/a313fbe6/attachment.sig>


More information about the pkg-perl-maintainers mailing list