openwrt/scripts
Jo-Philipp Wich b616aa6db7 scripts/package-metadata.pl: inhibit compile deps on missing build types
When a package declares a PKG_BUILD_DEPENDENCY or HOST_BUILD_DEPENDENCY on
a not existing build type, the metadata script will emit a reference to an
unresolvable build target in tmp/.packagedeps, causing the make process to
fail hard in a way not catchable by the IGNORE_ERRORS mechanism.

In a situation where a package "test-a" declares a build dependency
"PKG_BUILD_DEPENDS:=test-b/host" while the Makefile of "test-b" does not
implement a HostBuild, make fails with an unrecoverable error in the form:

    make[1]: Entering directory '...'
    make[1]: *** No rule to make target 'package/test-b/host/compile',
                 needed by 'package/test-a/compile'.  Stop.
    make[1]: Leaving directory '...'
    .../toplevel.mk:200: recipe for target 'package/test-a/compile' failed
    make: *** [package/test-a/compile] Error 2

Extend the metadata generation script to catch such unresolved references
and emit a visable warning upon detection.

After this change, the script will emit a warning similar to:

    WARNING: Makefile "package/test-a/Makefile" has a build dependency on
    "test-b/host" but "package/test-b/Makefile" does not implement a
    "host" build type

Fixes a global build cluster outage which occured after the "python-cffi"
feed package removed its HostBuild which the "python-cryptography" package
build-depended on.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bf5d32af2a)
2017-12-13 16:23:39 +01:00
..
config
flashing build: remove absolute path to perl and replace with /usr/bin/env perl 2017-12-13 15:21:02 +01:00
arm-magic.sh
brcmImage.pl
bundle-libraries.sh build: bundle-libraries.sh: do not override argv[0] in inner exec calls 2017-12-13 16:23:39 +01:00
checkpatch.pl build: remove absolute path to perl and replace with /usr/bin/env perl 2017-12-13 15:21:02 +01:00
clang-gcc-wrapper
clean-package.sh
cleanfile build: remove absolute path to perl and replace with /usr/bin/env perl 2017-12-13 15:21:02 +01:00
cleanpatch build: remove absolute path to perl and replace with /usr/bin/env perl 2017-12-13 15:21:02 +01:00
combined-ext-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
combined-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
config.guess
config.rpath
config.sub
deptest.sh
diffconfig.sh
dl_cleanup.py
download.pl scripts/download.pl: Adjust URLs 2017-12-13 16:23:39 +01:00
env
ext-toolchain.sh scripts: Probe external toolchains for libthread-db 2017-12-13 15:28:29 +01:00
feeds feeds: add option to force feed update despite modified files 2017-04-28 17:02:48 +02:00
fixup-makefile.pl build: add FIXUP option for make check 2016-12-17 10:36:45 +01:00
gen-dependencies.sh gen-dependencies.sh: fix handling variations in "file" output 2017-03-01 20:37:36 +01:00
get_source_date_epoch.sh scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback 2017-03-01 20:37:36 +01:00
getver.sh scripts/getver.sh: append short git hash based on upstream commit 2017-03-01 20:37:35 +01:00
ipkg-build
ipkg-make-index.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
kconfig.pl
make-ipkg-dir.sh
md5sum
metadata.pm
mkhash.c build: add a small standalone utility for calculating md5/sha256 hash 2017-01-05 11:09:12 +01:00
mkits.sh
om-fwupgradecfg-gen.sh treewide: fix shellscript syntax errors/typos 2017-09-13 08:07:39 +02:00
openbsd.sh
package-metadata.pl scripts/package-metadata.pl: inhibit compile deps on missing build types 2017-12-13 16:23:39 +01:00
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh rstrip.sh: fix handling variations in "file" output 2017-03-01 20:37:36 +01:00
slugimage.pl
srecimage.pl
strip-kmod.sh
symlink-tree.sh docs: remove all refrences in Makefiles/scripts 2016-11-30 10:13:14 +01:00
sysupgrade-tar.sh
target-metadata.pl scripts: only generate config from feature flag if fully match 2017-12-13 14:48:10 +01:00
timestamp.pl
ubinize-image.sh