fix a small bug in the recursive dependency lookup for generated menuconfig files
authorFelix Fietkau <nbd@openwrt.org>
Mon, 4 Aug 2008 23:43:13 +0000 (23:43 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 4 Aug 2008 23:43:13 +0000 (23:43 +0000)
SVN-Revision: 12107

scripts/metadata.pl

index 007b63ed9febe816ddc52ada44ba32116a9266ec..d920f59fcaf60a5beccbe6b88c1c691b04088736 100755 (executable)
@@ -380,14 +380,14 @@ sub mconf_depends($$) {
                        $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
                } else {
                        $flags =~ /\+/ and do {
                        $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
                } else {
                        $flags =~ /\+/ and do {
-                               next if $only_dep;
-                               $m = "select";
-
                                # Menuconfig will not treat 'select FOO' as a real dependency
                                # thus if FOO depends on other config options, these dependencies
                                # will not be checked. To fix this, we simply emit all of FOO's
                                # depends here as well.
                                $package{$depend} and mconf_depends($package{$depend}->{depends}, 1, $dep);
                                # Menuconfig will not treat 'select FOO' as a real dependency
                                # thus if FOO depends on other config options, these dependencies
                                # will not be checked. To fix this, we simply emit all of FOO's
                                # depends here as well.
                                $package{$depend} and mconf_depends($package{$depend}->{depends}, 1, $dep);
+
+                               $m = "select";
+                               next if $only_dep;
                        };
                        $flags =~ /@/ or $depend = "PACKAGE_$depend";
                }
                        };
                        $flags =~ /@/ or $depend = "PACKAGE_$depend";
                }