aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-02-12 23:50:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-02-12 23:50:40 +0000
commit73f9c65d775c5a317352398c42341701df5b6efa (patch)
treec431c31cd684066e1b64ccc5016cf027a15da252
parentb3e2982d277d755a0d35a8f7bd1e9c55bcae0d2b (diff)
downloadupstream-73f9c65d775c5a317352398c42341701df5b6efa.tar.gz
upstream-73f9c65d775c5a317352398c42341701df5b6efa.tar.bz2
upstream-73f9c65d775c5a317352398c42341701df5b6efa.zip
Menuconfig will not treat 'select FOO' as a real dependency
thus if BAR depends on FOO and FOO depends on other config options, these dependencies will not be checked. To fix this, we simply emit all of FOO's depends (only real dependencies, no select) for BAR as well. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6293 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/ntfs-3g/Makefile2
-rwxr-xr-xscripts/metadata.pl48
2 files changed, 35 insertions, 15 deletions
diff --git a/package/ntfs-3g/Makefile b/package/ntfs-3g/Makefile
index d48ef3695f..314a52c0ff 100644
--- a/package/ntfs-3g/Makefile
+++ b/package/ntfs-3g/Makefile
@@ -27,7 +27,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/ntfs-3g
TITLE:=NTFS-3G
- DEPENDS:=+libfuse +fuse-utils @LINUX_2_6
+ DEPENDS:=+libfuse +fuse-utils
SECTION:=utils
CATEGORY:=Utilities
DESCRIPTION:=\
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 963be3f382..7514a17135 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -341,6 +341,39 @@ sub package_depends($$) {
return $ret;
}
+sub mconf_depends($$) {
+ my $depends = shift;
+ my $only_dep = shift;
+ my $res;
+
+ $depends or return;
+ my @depends = @$depends;
+ foreach my $depend (@depends) {
+ my $m = "depends";
+ $depend =~ s/^([@\+]+)//;
+ my $flags = $1;
+ my $vdep;
+
+ if ($vdep = $package{$depend}->{vdepends}) {
+ $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 $res .= mconf_depends($package{$depend}->{depends}, 1);
+ };
+ $flags =~ /@/ or $depend = "PACKAGE_$depend";
+ }
+ $res .= "\t\t$m $depend\n";
+ }
+ return $res;
+}
+
sub print_package_config_category($) {
my $cat = shift;
my %menus;
@@ -394,20 +427,7 @@ sub print_package_config_category($) {
foreach my $default (split /\s*,\s*/, $pkg->{default}) {
print "\t\tdefault $default\n";
}
- foreach my $depend (@{$pkg->{depends}}) {
- my $m = "depends";
- $depend =~ s/^([@\+]+)//;
- my $flags = $1;
- my $vdep;
-
- if ($vdep = $package{$depend}->{vdepends}) {
- $depend = join("||", map { "PACKAGE_".$_ } @$vdep);
- } else {
- $flags =~ /@/ or $depend = "PACKAGE_$depend";
- $flags =~ /\+/ and $m = "select";
- }
- print "\t\t$m $depend\n";
- }
+ print mconf_depends($pkg->{depends}, 0);
print "\t\thelp\n";
print $pkg->{description};
print "\n";