From dc852d373977e8f609dc8887a0891650bfc18300 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Thu, 19 Sep 2013 23:25:59 +0100 Subject: [PATCH] corelist.pl - Improve the updating of %delta and %deprecated Both of these hashes needed to have the existing stub sections for the new $perl_vnum manually removed prior to running corelist.pl otherwise a second section for $perl_vnum got added. The script now deletes any such existing section itself before adding the new (real) one. --- Porting/corelist.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Porting/corelist.pl b/Porting/corelist.pl index db8bf2d..aa63f98 100755 --- a/Porting/corelist.pl +++ b/Porting/corelist.pl @@ -151,6 +151,7 @@ for my $key (sort keys($delta_data->{removed} || {})) { $versions_in_release .= " }\n"; $versions_in_release .= " },\n"; +$corelist =~ s/^(my %delta\s*=\s*.*?)^\s*$perl_vnum\s*=>\s*{.*?},\s*(^\);)$/$1$2/ism; $corelist =~ s/^(my %delta\s*=\s*.*?)(^\);)$/$1$versions_in_release$2/ism; exit unless %modlist; @@ -256,6 +257,7 @@ $corelist =~ s/^%upstream .*? ;$/$upstream_stanza/ismx; $deprecated_stanza .= " }\n"; $deprecated_stanza .= " },\n"; + $corelist =~ s/^(%deprecated\s*=\s*.*?)^\s*$perl_vnum\s*=>\s*{.*?},\s*(^\);)$/$1$2/ism; $corelist =~ s/^(%deprecated\s*=\s*.*?)(^\);)$/$1$deprecated_stanza$2/xism; } -- 2.7.4