aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pl
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-01-05 20:02:59 +0000
committerLars-Peter Clausen <lars@metafoo.de>2009-01-05 20:02:59 +0000
commita77f3b665673fc5ad72271c8d2c9ef4a4cfeadd3 (patch)
treea9a6efb4d3f4e9df293ea60c886e9bd157072a5c /scripts/metadata.pl
parent8c3a967fae06af740e28b7f97a3db3d5b091b29d (diff)
downloadupstream-a77f3b665673fc5ad72271c8d2c9ef4a4cfeadd3.tar.gz
upstream-a77f3b665673fc5ad72271c8d2c9ef4a4cfeadd3.tar.bz2
upstream-a77f3b665673fc5ad72271c8d2c9ef4a4cfeadd3.zip
If a package is part of a virtual dependency and also listed as a normal dependency ensure that the dependency is always unconditional. Such a case happens if for example a package has a build dependency and the build dependency provides a virtual install dependency of the package.
SVN-Revision: 13877
Diffstat (limited to 'scripts/metadata.pl')
-rwxr-xr-xscripts/metadata.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 43e5ccc6d0..f000e9db9a 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -560,7 +560,7 @@ sub gen_package_mk() {
}
my $hasdeps = 0;
- my $depline = "";
+ my %deplines;
foreach my $deps (@srcdeps) {
my $idx;
my $condition;
@@ -588,9 +588,10 @@ sub gen_package_mk() {
}
undef $idx if $idx =~ /^(kernel)|(base-files)$/;
if ($idx) {
+ my $depline;
next if $pkg->{src} eq $pkg_dep->{src};
next if $dep{$pkg->{src}."->".$idx};
- next if $dep{$pkg->{src}."->($dep)".$idx};
+ next if $dep{$pkg->{src}."->($dep)".$idx} and $pkg_dep->{vdepends};
my $depstr;
if ($pkg_dep->{vdepends}) {
@@ -602,16 +603,20 @@ sub gen_package_mk() {
}
if ($condition) {
if ($condition =~ /^!(.+)/) {
- $depline .= " \$(if \$(CONFIG_$1),,$depstr)";
+ $depline = "\$(if \$(CONFIG_$1),,$depstr)";
} else {
- $depline .= " \$(if \$(CONFIG_$condition),$depstr)";
+ $depline = "\$(if \$(CONFIG_$condition),$depstr)";
}
} else {
- $depline .= " $depstr";
+ $depline = $depstr;
+ }
+ if ($depline) {
+ $deplines{$idx.$dep} = $depline;
}
}
}
}
+ my $depline = join(" ", values %deplines);
if ($depline) {
$line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/compile += $depline\n";
}