metadata.pl: fix handling of HOST_BUILD_DEPENDS if a package is referenced that only...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Sep 2010 01:43:20 +0000 (01:43 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Sep 2010 01:43:20 +0000 (01:43 +0000)
SVN-Revision: 22946

scripts/metadata.pl

index a9242d0a7fb9353eaa8e74b566d5efcbcfdd1c84..336605f7b0edf6d05d42491c56ed8ed5eb716f71 100755 (executable)
@@ -667,14 +667,15 @@ sub gen_package_mk() {
                                        $dep = $1;
                                        $suffix = $2;
                                }
-                               my $pkg_dep = $package{$dep};
-                               next unless $pkg_dep;
 
                                my $idx = "";
-                               if (defined $pkg_dep->{src}) {
+                               my $pkg_dep = $package{$dep};
+                               if (defined($pkg_dep) && defined($pkg_dep->{src})) {
                                        $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
                                } elsif (defined($srcpackage{$dep})) {
                                        $idx = $subdir{$dep}.$dep;
+                               } else {
+                                       next;
                                }
                                my $depstr = "\$(curdir)/$idx$suffix/compile";
                                my $depline = get_conditional_dep($condition, $depstr);