Package: libfile-fu-perl
Version: 0.0.8-2
Severity: important
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: ftbfs locale
Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=110210
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

This package fails to build in non-English locales, because
t/00basic.t hardcodes English error messages.

This can be fixed either by setting LC_ALL=C in debian/rules or by using
setlocale(LC_ALL, 'C') in the relevant test scripts. Patch to do the
former attached (and already forwarded upstream.)
-- 
Niko Tyni   nt...@debian.org
>From 0b458588148ebcc5933085f0943bb9aa150c548d Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Tue, 8 Dec 2015 23:21:01 +0200
Subject: [PATCH] Set the locale to C for test scripts that hardcode English
 error messages

This fixes test failures in other locales, like fr_FR.UTF-8.

Bug: https://rt.cpan.org/Public/Bug/Display.html?id=110210
---
 t/dir.t    | 5 +++++
 t/errors.t | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/t/dir.t b/t/dir.t
index 856fe0f..41aed6c 100755
--- a/t/dir.t
+++ b/t/dir.t
@@ -7,6 +7,11 @@ use Test::More qw(no_plan);
 
 use File::Fu;
 
+use POSIX qw(locale_h);
+
+# tests hardcode English error messages
+setlocale(LC_ALL, "C");
+
 {
   my $d = File::Fu->dir("foo." . $$);
   $d->e and $d->rmdir;
diff --git a/t/errors.t b/t/errors.t
index 635bf9d..26c6978 100755
--- a/t/errors.t
+++ b/t/errors.t
@@ -7,6 +7,11 @@ use Test::More qw(no_plan);
 
 use File::Fu;
 
+use POSIX qw(locale_h);
+
+# tests hardcode English error messages
+setlocale(LC_ALL, "C");
+
 { # invalid ops
   my $f = File::Fu->dir;
 
-- 
2.6.2

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to