From f15874f103ad45b6bd76824af5ae2e80f0972119 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Fri, 20 Sep 2013 00:16:26 +0100 Subject: [PATCH] corelist.pl - Prefer more recent versions where many have the same delta When adding a new section to %delta in CoreList.pm and Utils.pm if we find several previous versions which we can take the delta from then prefer the most recent version. This has the effect that when adding the 5.019004 section to Utils.pm we now choose 5.019003 rather than a random one of 5.019000 (or 5.019), 5.019001, 5.019002 or 5.019003. --- Porting/corelist.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Porting/corelist.pl b/Porting/corelist.pl index 60032fe..7227be3 100755 --- a/Porting/corelist.pl +++ b/Porting/corelist.pl @@ -382,8 +382,9 @@ sub make_corelist_delta { } my $smallest = (sort { - (keys($deltas{$a}->{changed}) + keys($deltas{$a}->{removed})) <=> - (keys($deltas{$b}->{changed}) + keys($deltas{$b}->{removed})) + ((keys($deltas{$a}->{changed}) + keys($deltas{$a}->{removed})) <=> + (keys($deltas{$b}->{changed}) + keys($deltas{$b}->{removed}))) || + $b <=> $a } keys %deltas)[0]; return { @@ -415,8 +416,9 @@ sub make_coreutils_delta { } my $smallest = (sort { - (keys($deltas{$a}->{changed}) + keys($deltas{$a}->{removed})) <=> - (keys($deltas{$b}->{changed}) + keys($deltas{$b}->{removed})) + ((keys($deltas{$a}->{changed}) + keys($deltas{$a}->{removed})) <=> + (keys($deltas{$b}->{changed}) + keys($deltas{$b}->{removed}))) || + $b <=> $a } keys %deltas)[0]; return { -- 2.7.4