@ -871,6 +871,28 @@ sub gen_package_feeds() {
}
}
}
}
sub gen_package_license ($) {
my $ level = shift ;
parse_package_metadata ( $ ARGV [ 0 ] ) or exit 1 ;
foreach my $ name ( sort { uc ( $ a ) cmp uc ( $ b ) } keys % package ) {
my $ pkg = $ package { $ name } ;
if ( $ pkg - > { name } ) {
if ( $ pkg - > { license } ) {
print "$pkg->{name}: " ;
print "$pkg->{license}\n" ;
if ( $ pkg - > { licensefiles } && $ level == 0 ) {
print "\tFiles: $pkg->{licensefiles}\n" ;
}
} else {
if ( $ level == 1 ) {
print "$pkg->{name}: Missing license! " ;
print "Please fix $pkg->{makefile}\n" ;
}
}
}
}
}
sub parse_command () {
sub parse_command () {
my $ cmd = shift @ ARGV ;
my $ cmd = shift @ ARGV ;
for ( $ cmd ) {
for ( $ cmd ) {
@ -880,6 +902,8 @@ sub parse_command() {
/^kconfig/ and return gen_kconfig_overrides ( ) ;
/^kconfig/ and return gen_kconfig_overrides ( ) ;
/^package_source$/ and return gen_package_source ( ) ;
/^package_source$/ and return gen_package_source ( ) ;
/^package_feeds$/ and return gen_package_feeds ( ) ;
/^package_feeds$/ and return gen_package_feeds ( ) ;
/^package_license$/ and return gen_package_license ( 0 ) ;
/^package_licensefull$/ and return gen_package_license ( 1 ) ;
}
}
print << EOF
print << EOF
Available Commands:
Available Commands:
@ -889,6 +913,8 @@ Available Commands:
$ 0 kconfig [ file ] [ config ] Kernel config overrides
$ 0 kconfig [ file ] [ config ] Kernel config overrides
$ 0 package_source [ file ] Package source file information
$ 0 package_source [ file ] Package source file information
$ 0 package_feeds [ file ] Package feed information in makefile format
$ 0 package_feeds [ file ] Package feed information in makefile format
$ 0 package_license [ file ] Package license information
$ 0 package_licensefull [ file ] Package license information ( full list )
EOF
EOF
}
}