summaryrefslogtreecommitdiff
path: root/scripts/metadata.pm
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-10 16:35:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-10 16:35:16 +0000
commit3d8c8cf3bb3c56d84051de4fcd0c16c6f7cd4e10 (patch)
treeecdc5e67ac43ea088ec8806cf8bae899fe7bdc2b /scripts/metadata.pm
parentda19a09b9e4d7e8177208a8915502b7f15812e83 (diff)
downloadmtk-20170518-3d8c8cf3bb3c56d84051de4fcd0c16c6f7cd4e10.zip
mtk-20170518-3d8c8cf3bb3c56d84051de4fcd0c16c6f7cd4e10.tar.gz
mtk-20170518-3d8c8cf3bb3c56d84051de4fcd0c16c6f7cd4e10.tar.bz2
scripts/metadata.pl: add support for ignoring source packages when generating metadata
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48170
Diffstat (limited to 'scripts/metadata.pm')
-rw-r--r--scripts/metadata.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index 09273df..0ed3524 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -2,7 +2,7 @@ package metadata;
use base 'Exporter';
use strict;
use warnings;
-our @EXPORT = qw(%package %srcpackage %category %subdir %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline);
+our @EXPORT = qw(%package %srcpackage %category %subdir %preconfig %features %overrides clear_packages parse_package_metadata parse_target_metadata get_multiline @ignore);
our %package;
our %preconfig;
@@ -11,6 +11,7 @@ our %category;
our %subdir;
our %features;
our %overrides;
+our @ignore;
sub get_multiline {
my $fh = shift;
@@ -130,6 +131,7 @@ sub parse_package_metadata($) {
my $subdir;
my $src;
my $override;
+ my %ignore = map { $_ => 1 } @ignore;
open FILE, "<$file" or do {
warn "Cannot open '$file': $!\n";
@@ -152,6 +154,7 @@ sub parse_package_metadata($) {
$overrides{$src} = 1;
};
next unless $src;
+ next if $ignore{$src};
/^Package:\s*(.+?)\s*$/ and do {
undef $feature;
$pkg = {};