metadata.pl: add support for selecting packages available only via PROVIDES
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
91f205acaf
commit
4a3348ef09
1 changed files with 30 additions and 20 deletions
|
@ -457,10 +457,17 @@ sub mconf_depends {
|
|||
$depend = $2;
|
||||
}
|
||||
next if $package{$depend} and $package{$depend}->{buildonly};
|
||||
if ($flags =~ /\+/) {
|
||||
if ($vdep = $package{$depend}->{vdepends}) {
|
||||
$depend = join("||", map { "PACKAGE_".$_ } @$vdep);
|
||||
} else {
|
||||
$flags =~ /\+/ and do {
|
||||
my @vdeps = @$vdep;
|
||||
$depend = shift @vdeps;
|
||||
if (@vdeps > 1) {
|
||||
$condition = '!('.join("||", map { "PACKAGE_".$_ } @vdeps).')';
|
||||
} elsif (@vdeps > 0) {
|
||||
$condition = '!PACKAGE_'.$vdeps[0];
|
||||
}
|
||||
}
|
||||
|
||||
# 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
|
||||
|
@ -469,7 +476,11 @@ sub mconf_depends {
|
|||
|
||||
$m = "select";
|
||||
next if $only_dep;
|
||||
};
|
||||
} else {
|
||||
if ($vdep = $package{$depend}->{vdepends}) {
|
||||
$depend = join("||", map { "PACKAGE_".$_ } @$vdep);
|
||||
}
|
||||
}
|
||||
$flags =~ /@/ or $depend = "PACKAGE_$depend";
|
||||
if ($condition) {
|
||||
if ($m =~ /select/) {
|
||||
|
@ -479,7 +490,6 @@ sub mconf_depends {
|
|||
$depend = "!($condition) || $depend" unless $dep->{$condition} eq 'select';
|
||||
}
|
||||
}
|
||||
}
|
||||
$dep->{$depend} =~ /select/ or $dep->{$depend} = $m;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue