提交 ae88f003 编写于 作者: F Felix Fietkau

scripts/package-metadata.pl: strip already selected conditions from dependencies

When a dependency is pulled in via conditional depends, and the condition
is already selected earlier in the chain, drop the condition.
This avoids some corner cases that trigger recursive dependencies.
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 6252c18d
...@@ -160,6 +160,8 @@ sub mconf_depends { ...@@ -160,6 +160,8 @@ sub mconf_depends {
$depend =~ s/^([@\+]+)// and $flags = $1; $depend =~ s/^([@\+]+)// and $flags = $1;
my $condition = $parent_condition; my $condition = $parent_condition;
$depend = $2 if $depend =~ /^(.+):(.+)$/ and $dep->{$1} eq 'select';
next if $condition eq $depend; next if $condition eq $depend;
next if $seen->{"$parent_condition:$depend"}; next if $seen->{"$parent_condition:$depend"};
next if $seen->{":$depend"}; next if $seen->{":$depend"};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册