summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff')
-rw-r--r--meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff b/meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff
new file mode 100644
index 0000000000..f0a6924499
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.14.3/debian/squelch-locale-warnings.diff
@@ -0,0 +1,56 @@
1Upstream-Status:Inappropriate [debian patches]
2From 718e9cbd59f0739fc9104af111e42fff66f927a7 Mon Sep 17 00:00:00 2001
3From: Niko Tyni <ntyni@debian.org>
4Date: Sun, 3 Oct 2010 21:36:17 +0300
5Subject: Squelch locale warnings in Debian package maintainer scripts
6
7Bug-Debian: http://bugs.debian.org/508764
8
9The system locales are rather frequently out of sync with the C library
10during package upgrades, causing a huge amount of useless Perl locale
11warnings. Squelch them when running package maintainer scripts, detected
12by the DPKG_RUNNING_VERSION environment variable.
13
14Any real locale problem will show up after the system upgrade too, and
15the warning will be triggered normally again at that point.
16
17Patch-Name: debian/squelch-locale-warnings.diff
18---
19 locale.c | 4 ++++
20 pod/perllocale.pod | 8 ++++++++
21 2 files changed, 12 insertions(+), 0 deletions(-)
22
23diff --git a/locale.c b/locale.c
24index 4631b86..94a0962 100644
25--- a/locale.c
26+++ b/locale.c
27@@ -359,6 +359,10 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
28 char *p;
29 const bool locwarn = (printwarn > 1 ||
30 (printwarn &&
31+
32+ /* Debian specific change - see http://bugs.debian.org/508764 */
33+ (!PerlEnv_getenv("DPKG_RUNNING_VERSION")) &&
34+
35 (!(p = PerlEnv_getenv("PERL_BADLANG")) || atoi(p))));
36
37 if (locwarn) {
38diff --git a/pod/perllocale.pod b/pod/perllocale.pod
39index 8926d8b..6c55889 100644
40--- a/pod/perllocale.pod
41+++ b/pod/perllocale.pod
42@@ -861,6 +861,14 @@ B<NOTE>: PERL_BADLANG only gives you a way to hide the warning message.
43 The message tells about some problem in your system's locale support,
44 and you should investigate what the problem is.
45
46+=item DPKG_RUNNING_VERSION
47+
48+On Debian systems, if the DPKG_RUNNING_VERSION environment variable is
49+set (to any value), the locale failure warnings will be suppressed just
50+like with a zero PERL_BADLANG setting. This is done to avoid floods
51+of spurious warnings during system upgrades.
52+See L<http://bugs.debian.org/508764>.
53+
54 =back
55
56 The following environment variables are not specific to Perl: They are