0031-Revert-scripts-package-metadata.pl-inhibit-compile-deps-on-missing-build-types.patch 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Tue, 9 Jan 2018 16:31:07 +0100
  3. Subject: Revert "scripts/package-metadata.pl: inhibit compile deps on missing build types"
  4. This reverts commit b616aa6db7a9952c182ab49d7942fb67c09803d5. The change
  5. conflicts with our PROVIDES fix and is not strictly necessary for Gluon.
  6. diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
  7. index c49d132912828531c7125787f4f53d7130323123..2da32c770ef3333bfcc18922ede556f9734510c7 100755
  8. --- a/scripts/package-metadata.pl
  9. +++ b/scripts/package-metadata.pl
  10. @@ -460,27 +460,20 @@ sub gen_package_mk() {
  11. next unless $pkg->{"builddepends/$type"};
  12. foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
  13. my $suffix = "";
  14. - my $deptype = "";
  15. my $condition;
  16. if ($dep =~ /^(.+):(.+)/) {
  17. $condition = $1;
  18. $dep = $2;
  19. }
  20. - if ($dep =~ /^(.+)\/(.+)/) {
  21. + if ($dep =~ /^(.+)(\/.+)/) {
  22. $dep = $1;
  23. - $deptype = $2;
  24. - $suffix = "/$2";
  25. + $suffix = $2;
  26. }
  27. my $idx = "";
  28. my $pkg_dep = $package{$dep};
  29. if (defined($pkg_dep) && defined($pkg_dep->{src})) {
  30. - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
  31. - warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
  32. - $pkg->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
  33. - next;
  34. - }
  35. $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
  36. } elsif (defined($srcpackage{$dep})) {
  37. $idx = $subdir{$dep}.$dep;
  38. @@ -506,16 +499,14 @@ sub gen_package_mk() {
  39. my $condition;
  40. my $prefix = "";
  41. my $suffix = "";
  42. - my $deptype = "";
  43. if ($deps =~ /^(.+):(.+)/) {
  44. $condition = $1;
  45. $deps = $2;
  46. }
  47. - if ($deps =~ /^(.+)\/(.+)/) {
  48. + if ($deps =~ /^(.+)(\/.+)/) {
  49. $deps = $1;
  50. - $deptype = $2;
  51. - $suffix = "/$2";
  52. + $suffix = $2;
  53. }
  54. my $pkg_dep = $package{$deps};
  55. @@ -530,17 +521,7 @@ sub gen_package_mk() {
  56. foreach my $dep (@deps) {
  57. $pkg_dep = $package{$deps};
  58. if (defined $pkg_dep->{src}) {
  59. - unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
  60. - warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
  61. - $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
  62. - next;
  63. - }
  64. - unless ($pkg->{src} ne $pkg_dep->{sec}.$suffix) {
  65. - warn sprintf "WARNING: Makefile '%s' has a build dependency on itself\n",
  66. - $pkg->{makefile};
  67. - next;
  68. - }
  69. - $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
  70. + ($pkg->{src} ne $pkg_dep->{src}.$suffix) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
  71. } elsif (defined($srcpackage{$dep})) {
  72. $idx = $subdir{$dep}.$dep;
  73. }
  74. @@ -592,7 +573,7 @@ ifndef DUMP_TARGET_DB
  75. ( \\
  76. $cmds \\
  77. ) > \$@
  78. -
  79. +
  80. ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
  81. package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
  82. endif