diff options
author | Francois Perrad <fperrad@gmail.com> | 2018-08-13 18:15:53 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-08-14 15:37:14 +0200 |
commit | cd87d05f7792647d49694087f14e0307ba5b1be6 (patch) | |
tree | c9bb60931c7e02fb23cec5c6bd6bfac9b70e0e60 | |
parent | a96680891a7c23c31d07e5a32896f808c20e453c (diff) | |
download | buildroot-cd87d05f7792647d49694087f14e0307ba5b1be6.tar.gz buildroot-cd87d05f7792647d49694087f14e0307ba5b1be6.zip |
scancpan: warn on undefined LICENSE
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rwxr-xr-x | utils/scancpan | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/scancpan b/utils/scancpan index fa31dfdeab..8f47521692 100755 --- a/utils/scancpan +++ b/utils/scancpan @@ -705,6 +705,10 @@ while (my ($distname, $dist) = each %dist) { $license =~ s|openssl|OpenSSL|; $license =~ s|perl_5|Artistic or GPL-1.0+|; my $license_files = join q{ }, keys %{$license_files{$distname}}; + if ($license_files && (!$license || $license eq q{unknown})) { + push @info, qq{[$distname] undefined LICENSE, see $license_files}; + $license = q{???}; + } say qq{write ${mkname}} unless $quiet; open my $fh, q{>}, $mkname; say {$fh} qq{################################################################################}; @@ -718,7 +722,7 @@ while (my ($distname, $dist) = each %dist) { say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}}; say {$fh} qq{${brname}_DEPENDENCIES = ${dependencies}} if $need_target{$distname} && $dependencies; say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}} if $need_host{$distname} && $host_dependencies; - say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown}; + say {$fh} qq{${brname}_LICENSE = ${license}} if $license; say {$fh} qq{${brname}_LICENSE_FILES = ${license_files}} if $license_files; say {$fh} qq{}; foreach (sort @{$deps_optional{$distname}}) { |