diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff b/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff deleted file mode 100644 index c2ac4a3bdf..0000000000 --- a/meta/recipes-devtools/perl/perl/debian/deprecate-with-apt.diff +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From def4aa3817f98aae625e601b791ef068276f05d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dominic Hargreaves <dom@earth.li> | ||
3 | Date: Mon, 17 May 2010 13:23:07 +0300 | ||
4 | Subject: Point users to Debian packages of deprecated core modules | ||
5 | |||
6 | Bug-Debian: http://bugs.debian.org/747628 | ||
7 | |||
8 | Several modules are being deprecated with perl 5.20. | ||
9 | To get a clean transition, perl/perl-modules is going to recommend the | ||
10 | separate Debian packages of these for one release cycle so that they will be | ||
11 | pulled in by default on upgrades. This is taking place for perl 5.20/jessie. | ||
12 | |||
13 | However, on systems configured to ignore recommendations the deprecation | ||
14 | warnings will still be useful, so modify them slightly to point to the | ||
15 | separate packages instead. | ||
16 | |||
17 | Patch-Name: debian/deprecate-with-apt.diff | ||
18 | Upstream-Status: Pending | ||
19 | --- | ||
20 | lib/deprecate.pm | 15 ++++++++++++++- | ||
21 | 1 file changed, 14 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/lib/deprecate.pm b/lib/deprecate.pm | ||
24 | index 47bc112..b0c61df 100644 | ||
25 | --- a/lib/deprecate.pm | ||
26 | +++ b/lib/deprecate.pm | ||
27 | @@ -7,6 +7,13 @@ our $VERSION = 0.03; | ||
28 | our %Config; | ||
29 | unless (%Config) { require Config; *Config = \%Config::Config; } | ||
30 | |||
31 | +# Debian-specific change: recommend the separate Debian packages of | ||
32 | +# deprecated modules where available | ||
33 | + | ||
34 | +our %DEBIAN_PACKAGES = ( | ||
35 | + # None for the perl 5.22 cycle | ||
36 | +); | ||
37 | + | ||
38 | # This isn't a public API. It's internal to code maintained by the perl-porters | ||
39 | # If you would like it to be a public API, please send a patch with | ||
40 | # documentation and tests. Until then, it may change without warning. | ||
41 | @@ -58,9 +65,15 @@ EOM | ||
42 | if (defined $callers_bitmask | ||
43 | && (vec($callers_bitmask, $warnings::Offsets{deprecated}, 1) | ||
44 | || vec($callers_bitmask, $warnings::Offsets{all}, 1))) { | ||
45 | - warn <<"EOM"; | ||
46 | + if (my $deb = $DEBIAN_PACKAGES{$package}) { | ||
47 | + warn <<"EOM"; | ||
48 | +$package will be removed from the Perl core distribution in the next major release. Please install the separate $deb package. It is being used at $call_file, line $call_line. | ||
49 | +EOM | ||
50 | + } else { | ||
51 | + warn <<"EOM"; | ||
52 | $package will be removed from the Perl core distribution in the next major release. Please install it from CPAN. It is being used at $call_file, line $call_line. | ||
53 | EOM | ||
54 | + } | ||
55 | } | ||
56 | } | ||
57 | } | ||