fix gdb compile
[openwrt.git] / scripts / metadata.pm
index 917fbec..9486c66 100644 (file)
@@ -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,11 +77,18 @@ 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};
                        }
                };
                /^Depends: \s*(.+)\s*$/ and $pkg->{depends} = [ split /\s+/, $1 ];
+               /^Build-Only: \s*(.+)\s*$/ and $pkg->{buildonly} = 1;
                /^Build-Depends: \s*(.+)\s*$/ and $pkg->{builddepends} = [ split /\s+/, $1 ];
                /^Category: \s*(.+)\s*$/ and do {
                        $pkg->{category} = $1;
@@ -115,7 +123,7 @@ sub parse_package_metadata($) {
                /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1;
        }
        close FILE;
-       return %category;
+       return 1;
 }
 
 1;
This page took 0.022965 seconds and 4 git commands to generate.