12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- From: Matthias Schiffer <mschiffer@universe-factory.net>
- Date: Tue, 9 Jan 2018 16:31:07 +0100
- Subject: Revert "scripts/package-metadata.pl: inhibit compile deps on missing build types"
- This reverts commit b616aa6db7a9952c182ab49d7942fb67c09803d5. The change
- conflicts with our PROVIDES fix and is not strictly necessary for Gluon.
- diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
- index c49d132912828531c7125787f4f53d7130323123..2da32c770ef3333bfcc18922ede556f9734510c7 100755
- --- a/scripts/package-metadata.pl
- +++ b/scripts/package-metadata.pl
- @@ -460,27 +460,20 @@ sub gen_package_mk() {
- next unless $pkg->{"builddepends/$type"};
- foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
- my $suffix = "";
- - my $deptype = "";
- my $condition;
-
- if ($dep =~ /^(.+):(.+)/) {
- $condition = $1;
- $dep = $2;
- }
- - if ($dep =~ /^(.+)\/(.+)/) {
- + if ($dep =~ /^(.+)(\/.+)/) {
- $dep = $1;
- - $deptype = $2;
- - $suffix = "/$2";
- + $suffix = $2;
- }
-
- my $idx = "";
- my $pkg_dep = $package{$dep};
- if (defined($pkg_dep) && defined($pkg_dep->{src})) {
- - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
- - warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
- - $pkg->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
- - next;
- - }
- $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
- } elsif (defined($srcpackage{$dep})) {
- $idx = $subdir{$dep}.$dep;
- @@ -506,16 +499,14 @@ sub gen_package_mk() {
- my $condition;
- my $prefix = "";
- my $suffix = "";
- - my $deptype = "";
-
- if ($deps =~ /^(.+):(.+)/) {
- $condition = $1;
- $deps = $2;
- }
- - if ($deps =~ /^(.+)\/(.+)/) {
- + if ($deps =~ /^(.+)(\/.+)/) {
- $deps = $1;
- - $deptype = $2;
- - $suffix = "/$2";
- + $suffix = $2;
- }
-
- my $pkg_dep = $package{$deps};
- @@ -530,17 +521,7 @@ sub gen_package_mk() {
- foreach my $dep (@deps) {
- $pkg_dep = $package{$deps};
- if (defined $pkg_dep->{src}) {
- - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
- - warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
- - $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
- - next;
- - }
- - unless ($pkg->{src} ne $pkg_dep->{sec}.$suffix) {
- - warn sprintf "WARNING: Makefile '%s' has a build dependency on itself\n",
- - $pkg->{makefile};
- - next;
- - }
- - $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
- + ($pkg->{src} ne $pkg_dep->{src}.$suffix) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
- } elsif (defined($srcpackage{$dep})) {
- $idx = $subdir{$dep}.$dep;
- }
- @@ -592,7 +573,7 @@ ifndef DUMP_TARGET_DB
- ( \\
- $cmds \\
- ) > \$@
- -
- +
- ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
- package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
- endif
|