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