Add WL-700gE support (based on work by jr)
[openwrt.org/openwrt.git] / scripts / metadata.pl
blob:a/scripts/metadata.pl -> blob:b/scripts/metadata.pl
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -297,8 +297,12 @@
 	bool "$profile->{name}"
 	depends LINUX_$target->{conf}
 EOF
+			my %pkgs;
 			foreach my $pkg (@{$target->{packages}}, @{$profile->{packages}}) {
-				print "\tselect DEFAULT_$pkg\n";
+				$pkgs{$pkg} = 1;
+			}
+			foreach my $pkg (keys %pkgs) {
+				print "\tselect DEFAULT_$pkg\n" unless ($pkg =~ /^-/ or $pkgs{"-$pkg"});
 			}
 			print "\n";
 		}

comments