diff options
author | Francois Perrad <fperrad@gmail.com> | 2018-10-10 08:46:12 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-10-10 09:05:53 +0200 |
commit | b4fd962c46ee5c56ce79ca91eb818674aa5ac064 (patch) | |
tree | 4aa8a337496086aa874d07ebdff88bef1654866e /utils | |
parent | 8c3395a374eb7d710c9d407a48c12e98a65b00e9 (diff) | |
download | buildroot-b4fd962c46ee5c56ce79ca91eb818674aa5ac064.tar.gz buildroot-b4fd962c46ee5c56ce79ca91eb818674aa5ac064.zip |
scancpan: sort license in hash file
now, the output is reproductible
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/scancpan | 6 |
1 files changed, 4 insertions, 2 deletions
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}}; } } |