package-metadata: add CPE information to JSON package manifests
[openwrt/staging/stintel.git] / scripts / package-metadata.pl
index 4b2f5c8bde61bf8fe651f90c56d82e8360e3b93c..e34b738c0f1eea61d75c6c00a1394513d6476a60 100755 (executable)
@@ -160,6 +160,8 @@ sub mconf_depends {
                $depend =~ s/^([@\+]+)// and $flags = $1;
                my $condition = $parent_condition;
 
+               $depend = $2 if $depend =~ /^(.+):(.+)$/ and $dep->{$1} eq 'select';
+
                next if $condition eq $depend;
                next if $seen->{"$parent_condition:$depend"};
                next if $seen->{":$depend"};
@@ -609,6 +611,7 @@ ${json}{
 "version":"$pkg->{version}",
 "category":"$pkg->{category}",
 "license":"$pkg->{license}",
+"cpe_id":"$pkg->{cpe_id}",
 "maintainer": [$pkg_maintainer],
 "depends":[$pkg_deps]},
 END_JSON