uci firewall
[openwrt/svn-archive/archive.git] / scripts / metadata.pm
index ff39e346ea98988b9def135cfb56219f0a3b6d5a..fd18b18a29c039315f492cb938d392777f553071 100644 (file)
@@ -76,7 +76,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 +102,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 +121,7 @@ sub parse_package_metadata($) {
                /^Preconfig-Default:\s*(.*?)\s*$/ and $preconfig->{default} = $1;
        }
        close FILE;
-       return %category;
+       return 1;
 }
 
 1;