diff options
author | Ross Burton <ross.burton@intel.com> | 2017-06-15 17:48:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-02 11:25:32 +0000 |
commit | 6ef494c13b99919e086cac0fc9927189b9d48510 (patch) | |
tree | 579aa371b9bc7c1a46b9db832654758c68d3755a | |
parent | a3d175cd8dcc1dadcf0e176a728325194c6f4224 (diff) | |
download | poky-6ef494c13b99919e086cac0fc9927189b9d48510.tar.gz |
bin_package: fail if ${S} doesn't actually contain anything
If the user is trying to use bin_package but the SRC_URI hasn't extracted
anything into ${S}, which is easily done when writing a recipe by hand, instead
of silently shippping an empty package abort the build.
(From OE-Core rev: bf5627ddbe5371eba62f73c33735fb1cf35c2194)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/bin_package.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass index a52b75be5c..cbc9b1fa13 100644 --- a/meta/classes/bin_package.bbclass +++ b/meta/classes/bin_package.bbclass | |||
@@ -26,7 +26,10 @@ do_compile[noexec] = "1" | |||
26 | bin_package_do_install () { | 26 | bin_package_do_install () { |
27 | # Do it carefully | 27 | # Do it carefully |
28 | [ -d "${S}" ] || exit 1 | 28 | [ -d "${S}" ] || exit 1 |
29 | cd ${S} || exit 1 | 29 | if [ -z "$(ls -A ${S})" ]; then |
30 | bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S. | ||
31 | fi | ||
32 | cd ${S} | ||
30 | tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ | 33 | tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \ |
31 | | tar --no-same-owner -xpf - -C ${D} | 34 | | tar --no-same-owner -xpf - -C ${D} |
32 | } | 35 | } |