brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / scripts / metadata.pl
index a55b7990f71d8bdd9d1a4859f0bf90bd5619ef91..5695bda4a45bb31ed2cea3bd8d96152db473ea21 100755 (executable)
@@ -558,11 +558,14 @@ sub print_package_config_category($) {
                        print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
                        print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
                        unless ($pkg->{hidden}) {
+                               my @def = ("ALL");
+                               if (!exists($pkg->{repository})) {
+                                       push @def, "ALL_NONSHARED";
+                               }
                                if ($pkg->{name} =~ /^kmod-/) {
-                                       $pkg->{default} ||= "m if ALL_KMODS";
-                               } else {
-                                       $pkg->{default} ||= "m if ALL";
+                                       push @def, "ALL_KMODS";
                                }
+                               $pkg->{default} ||= "m if " . join("||", @def);
                        }
                        if ($pkg->{default}) {
                                foreach my $default (split /\s*,\s*/, $pkg->{default}) {