metadata.pl: use alphabetical order for menuconfig categories, also fixes random...
[openwrt.git] / scripts / metadata.pl
index 13abcb2..41f4690 100755 (executable)
@@ -165,7 +165,8 @@ sub target_config_features(@) {
                /pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
                /rtc/ and $ret .= "\tselect RTC_SUPPORT\n";
                /squashfs/ and $ret .= "\tselect USES_SQUASHFS\n";
-               /jffs2/ and $ret .= "\tselect USES_JFFS2\n";
+               /jffs2$/ and $ret .= "\tselect USES_JFFS2\n";
+               /jffs2_nand/ and $ret .= "\tselect USES_JFFS2_NAND\n";
                /ext4/ and $ret .= "\tselect USES_EXT4\n";
                /targz/ and $ret .= "\tselect USES_TARGZ\n";
                /cpiogz/ and $ret .= "\tselect USES_CPIOGZ\n";
@@ -615,7 +616,7 @@ EOF
        }
        print_package_features();
        print_package_config_category 'Base system';
-       foreach my $cat (keys %category) {
+       foreach my $cat (sort {uc($a) cmp uc($b)} keys %category) {
                print_package_config_category $cat;
        }
 }
@@ -756,7 +757,7 @@ sub gen_package_mk() {
                                        $idx = $subdir{$dep}.$dep;
                                }
                                $idx .= $suffix;
-                               undef $idx if $idx =~ /^(kernel)|(base-files)$/;
+                               undef $idx if $idx =~ /^(kernel\/linux)|(base-files)$/;
                                if ($idx) {
                                        my $depline;
                                        next if $pkg->{src} eq $pkg_dep->{src}.$suffix;