diff options
author | Yves Orton <demerphq@gmail.com> | 2023-03-15 12:27:33 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-03-28 17:59:54 +0800 |
commit | 2a46927f6475ad422e1f385f83333eaf45e2728d (patch) | |
tree | c0242b84719af30ca9eb00ccd5466efd0f69039d /Porting | |
parent | 19151286d6e3fc6fd8238e85d78ea74f2cae3cc8 (diff) | |
download | perl-2a46927f6475ad422e1f385f83333eaf45e2728d.tar.gz |
Porting/sync-with-cpan - pickup ExtUtils::MakeMaker changes better
ExtUtils::MakeMaker makes heavy use of dev releases, so the most recent change entry
does not contain much. This patch makes it so we read the full set of changes since
the last change when doing an update.
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/sync-with-cpan | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan index 4813d16c88..4c40382b81 100755 --- a/Porting/sync-with-cpan +++ b/Porting/sync-with-cpan @@ -615,6 +615,8 @@ if (!$changes_file) { chomp(my @lines = <$ifh>); close $ifh; my $seen_new_version; + my $is_update = $new_version ne $old_version; + for(my $idx = 0; $idx < @lines; $idx++) { if ($lines[$idx] =~ /$new_version/ || ($pkg_dir eq "CPAN" and $lines[$idx] =~/^\d{4}-\d{2}-\d{2}/ @@ -624,7 +626,12 @@ if (!$changes_file) { $seen_new_version = 1; push @changes_info, $lines[$idx]; } elsif ($seen_new_version) { - if (($lines[$idx]=~/\d\.\d/ and $lines[$idx]=~/20\d\d/) || + if ($is_update && $pkg_dir eq "ExtUtils-MakeMaker") { + if ($lines[$idx] =~/$old_version/) { + last; + } + } + elsif (($lines[$idx]=~/\d\.\d/ and $lines[$idx]=~/20\d\d/) || ($lines[$idx]=~/---------------------------------/) || ($pkg_dir eq "CPAN" and $lines[$idx] =~/^\d{4}-\d{2}-\d{2}/) || ($pkg_dir eq "version" and $lines[$idx] =~/^\d\.\d+/) || @@ -633,9 +640,9 @@ if (!$changes_file) { 0 # less commit churn if we have to tweak the heuristics above ){ last; - } else { - push @changes_info, $lines[$idx]; } + push @changes_info, $lines[$idx]; + } } if (!@changes_info) { |