[oe-commits] [openembedded-core] 17/44: bin_package: fail if ${S} doesn't actually contain anything

git at git.openembedded.org git at git.openembedded.org
Sat Dec 2 11:26:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit bf5627ddbe5371eba62f73c33735fb1cf35c2194
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Thu Jun 15 17:48:58 2017 +0100

    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.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/bin_package.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass
index a52b75b..cbc9b1f 100644
--- a/meta/classes/bin_package.bbclass
+++ b/meta/classes/bin_package.bbclass
@@ -26,7 +26,10 @@ do_compile[noexec] = "1"
 bin_package_do_install () {
     # Do it carefully
     [ -d "${S}" ] || exit 1
-    cd ${S} || exit 1
+    if [ -z "$(ls -A ${S})" ]; then
+        bbfatal bin_package has nothing to install. Be sure the SRC_URI unpacks into S.
+    fi
+    cd ${S}
     tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
         | tar --no-same-owner -xpf - -C ${D}
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list