From b4fd962c46ee5c56ce79ca91eb818674aa5ac064 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Wed, 10 Oct 2018 08:46:12 +0200 Subject: scancpan: sort license in hash file now, the output is reproductible Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- utils/scancpan | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/scancpan b/utils/scancpan index f7b707676d..64599f4305 100755 --- a/utils/scancpan +++ b/utils/scancpan @@ -767,10 +767,12 @@ while (my ($distname, $dist) = each %dist) { say {$fh} qq{# retrieved by scancpan from ${mirror}/}; say {$fh} qq{md5 ${md5} ${filename}}; say {$fh} qq{sha256 ${sha256} ${filename}}; - if (scalar keys %{$license_files{$distname}}) { + my %license_files = %{$license_files{$distname}}; + if (scalar keys %license_files) { say {$fh} q{}; say {$fh} qq{# computed by scancpan}; - while (my ($license, $digest) = each %{$license_files{$distname}}) { + foreach my $license (sort keys %license_files) { + my $digest = $license_files{$license}; say {$fh} qq{sha256 ${digest} ${license}}; } } -- cgit v1.2.1