X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/dda0649ef37ceb08df09c0dbc15f27cbdc8285d5..b2f91a7a4a62fefed7b76a17529808d8d3eb1440:/scripts/metadata.pm diff --git a/scripts/metadata.pm b/scripts/metadata.pm index ff39e346e..a527d68f8 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -54,6 +54,7 @@ sub parse_package_metadata($) { $srcpackage{$src} = []; undef $pkg; }; + next unless $src; /^Package:\s*(.+?)\s*$/ and do { $pkg = {}; $pkg->{src} = $src; @@ -76,7 +77,13 @@ sub parse_package_metadata($) { /^Provides: \s*(.+)\s*$/ and do { my @vpkg = split /\s+/, $1; foreach my $vpkg (@vpkg) { - $package{$vpkg} or $package{$vpkg} = { vdepends => [] }; + $package{$vpkg} or $package{$vpkg} = { + name => $vpkg, + vdepends => [], + src => $src, + subdir => $subdir, + makefile => $makefile + }; push @{$package{$vpkg}->{vdepends}}, $pkg->{name}; } }; @@ -96,7 +103,7 @@ sub parse_package_metadata($) { $type =~ /ipkg/ and $pkg->{tristate} = 1; } }; - /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE); + /^Config: \s*(.*)\s*$/ and $pkg->{config} = "$1\n".get_multiline(*FILE, "\t"); /^Prereq-Check:/ and $pkg->{prereq} = 1; /^Preconfig:\s*(.+)\s*$/ and do { my $pkgname = $pkg->{name}; @@ -115,7 +122,7 @@ sub parse_package_metadata($) { /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1; } close FILE; - return %category; + return 1; } 1;