diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.12.3/debian/deprecate-with-apt.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.12.3/debian/deprecate-with-apt.diff | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.12.3/debian/deprecate-with-apt.diff b/meta/recipes-devtools/perl/perl-5.12.3/debian/deprecate-with-apt.diff deleted file mode 100644 index ad0b0cfb86..0000000000 --- a/meta/recipes-devtools/perl/perl-5.12.3/debian/deprecate-with-apt.diff +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | Upstream-Status:Inappropriate [debian patch] | ||
2 | |||
3 | From: Niko Tyni <ntyni@debian.org> | ||
4 | Subject: Point users to Debian packages of deprecated core modules | ||
5 | Bug-Debian: http://bugs.debian.org/580034 | ||
6 | |||
7 | Class::ISA, Switch, Pod::Plainer, and (partially) Shell were | ||
8 | deprecated from the Perl core in 5.12.0. | ||
9 | |||
10 | To get a clean transition, perl-modules is going to recommend the separate | ||
11 | Debian packages of these for one release cycle so that they will be | ||
12 | pulled in by default on upgrades. | ||
13 | |||
14 | However, on systems configured to ignore recommendations the deprecation | ||
15 | warnings will still be useful, so modify them slightly to point to the | ||
16 | separate packages instead. | ||
17 | |||
18 | --- | ||
19 | lib/deprecate.pm | 18 +++++++++++++++++- | ||
20 | 1 files changed, 17 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/lib/deprecate.pm b/lib/deprecate.pm | ||
23 | index 7b92e0b..9db7330 100644 | ||
24 | --- a/lib/deprecate.pm | ||
25 | +++ b/lib/deprecate.pm | ||
26 | @@ -7,6 +7,16 @@ our $VERSION = 0.01; | ||
27 | our %Config; | ||
28 | unless (%Config) { require Config; *Config = \%Config::Config; } | ||
29 | |||
30 | +# Debian-specific change: recommend the separate Debian packages of | ||
31 | +# deprecated modules where available | ||
32 | + | ||
33 | +my %DEBIAN_PACKAGES = ( | ||
34 | + "Class::ISA" => "libclass-isa-perl", | ||
35 | + "Pod::Plainer" => "libpod-plainer-perl", | ||
36 | + "Switch" => "libswitch-perl", | ||
37 | + "Shell" => "libshell-perl", | ||
38 | +); | ||
39 | + | ||
40 | sub import { | ||
41 | my ($package, $file, $line) = caller; | ||
42 | my $expect_leaf = "$package.pm"; | ||
43 | @@ -44,9 +54,15 @@ EOM | ||
44 | if (defined $callers_bitmask | ||
45 | && (vec($callers_bitmask, $warnings::Offsets{deprecated}, 1) | ||
46 | || vec($callers_bitmask, $warnings::Offsets{all}, 1))) { | ||
47 | - warn <<"EOM"; | ||
48 | + if (my $deb = $DEBIAN_PACKAGES{$package}) { | ||
49 | + warn <<"EOM"; | ||
50 | +$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. | ||
51 | +EOM | ||
52 | + } else { | ||
53 | + warn <<"EOM"; | ||
54 | $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. | ||
55 | EOM | ||
56 | + } | ||
57 | } | ||
58 | return; | ||
59 | } | ||
60 | -- | ||
61 | tg: (a508b62..) debian/deprecate-with-apt (depends on: upstream) | ||