diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.2/debian/squelch-locale-warnings.diff')
| -rw-r--r-- | meta/recipes-devtools/perl/perl-5.14.2/debian/squelch-locale-warnings.diff | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/debian/squelch-locale-warnings.diff b/meta/recipes-devtools/perl/perl-5.14.2/debian/squelch-locale-warnings.diff new file mode 100644 index 0000000000..71660b08ba --- /dev/null +++ b/meta/recipes-devtools/perl/perl-5.14.2/debian/squelch-locale-warnings.diff | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From 718e9cbd59f0739fc9104af111e42fff66f927a7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Niko Tyni <ntyni@debian.org> | ||
| 3 | Date: Sun, 3 Oct 2010 21:36:17 +0300 | ||
| 4 | Subject: Squelch locale warnings in Debian package maintainer scripts | ||
| 5 | |||
| 6 | Bug-Debian: http://bugs.debian.org/508764 | ||
| 7 | |||
| 8 | The system locales are rather frequently out of sync with the C library | ||
| 9 | during package upgrades, causing a huge amount of useless Perl locale | ||
| 10 | warnings. Squelch them when running package maintainer scripts, detected | ||
| 11 | by the DPKG_RUNNING_VERSION environment variable. | ||
| 12 | |||
| 13 | Any real locale problem will show up after the system upgrade too, and | ||
| 14 | the warning will be triggered normally again at that point. | ||
| 15 | |||
| 16 | Patch-Name: debian/squelch-locale-warnings.diff | ||
| 17 | --- | ||
| 18 | locale.c | 4 ++++ | ||
| 19 | pod/perllocale.pod | 8 ++++++++ | ||
| 20 | 2 files changed, 12 insertions(+), 0 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/locale.c b/locale.c | ||
| 23 | index 4631b86..94a0962 100644 | ||
| 24 | --- a/locale.c | ||
| 25 | +++ b/locale.c | ||
| 26 | @@ -359,6 +359,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 | |||
| 36 | if (locwarn) { | ||
| 37 | diff --git a/pod/perllocale.pod b/pod/perllocale.pod | ||
| 38 | index 8926d8b..6c55889 100644 | ||
| 39 | --- a/pod/perllocale.pod | ||
| 40 | +++ b/pod/perllocale.pod | ||
| 41 | @@ -861,6 +861,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 | ||
