Source: libkiokudb-perl
Version: 0.57-3
Severity: important
Tags: ftbfs forky sid patch upstream
User: [email protected]
Usertags: perl-5.42-transition

This package fails to build with Perl 5.42 (currently in experimental.)

  
https://perl.debian.net/rebuild-logs/perl-5.42-throwaway/libkiokudb-perl_0.57-3/libkiokudb-perl_0.57-3_amd64-2025-08-22T10:46:20Z.build

   #   Failed test 'FQ reference only'
   #   at t/coderefs.t line 475.
   #     Structures begin differing at:
   #          $got->{package} = 'builtin'
   #     $expected->{package} = 'Scalar::Util'
   # Looks like you failed 1 test of 104.

This is because newer versions of Scalar::Util started to use
the builtin version of weaken() et al. where available. See

  https://github.com/Dual-Life/Scalar-List-Utils/pull/132/files

The attached patch adapts the test to the changed Scalar::Util
behaviour. It makes the test pass for me on both Perl 5.40
(Scalar::Util 1.63) and Perl 5.42 (Scalar::Util 1.68_01).
 
If you want to test changes against Perl 5.42 in experimental and run
into uninstallability problems, there is a test repository of rebuilt
Debian sid packages for amd64 available at <https://perl.debian.net/>.

Thanks for your work on Debian,
-- 
Niko Tyni   [email protected]
>From 1cd69975f17a3e883690565032c94fcff39e504b Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Sun, 24 Aug 2025 17:56:49 +0100
Subject: [PATCH] Adapt to Scalar::Util change to use builtin:: functions where
 available

Starting with Scalar::Util 1.64 (bundled with Perl 5.42),
Scalar::Util::weaken() is really builtin::weaken() on newer Perls.

See https://github.com/Dual-Life/Scalar-List-Utils/pull/132
---
 t/coderefs.t | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/t/coderefs.t b/t/coderefs.t
index 2a9b4ed..d935243 100644
--- a/t/coderefs.t
+++ b/t/coderefs.t
@@ -472,7 +472,10 @@ sub blah { 42 }
     my $entry = $dir->live_objects->id_to_entry($sub_id);
 
     ok( !exists($entry->data->{file}), "XSUB detected" );
-    is_deeply( $entry->data, { package => "Scalar::Util", name => "weaken" }, "FQ reference only" );
+    # see https://github.com/Dual-Life/Scalar-List-Utils/pull/132
+    my $expected_package = ($] >= 5.040 and eval { Scalar::Util->VERSION("1.64") }) ?
+        'builtin': 'Scalar::Util';
+    is_deeply( $entry->data, { package => $expected_package, name => "weaken" }, "FQ reference only" );
 
     $dir->live_objects->clear;
 }
-- 
2.49.0

Reply via email to