From patchwork Tue Nov 21 23:53:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 119430 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5946431qgn; Tue, 21 Nov 2017 15:53:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMbPwXgSzPQc4N9n2e/0c0M/2DicOI0NT8gWNpgFGTy6nvU5r3Eb9Hrgs2f+lb++HOFD9OFW X-Received: by 10.98.236.16 with SMTP id k16mr14591902pfh.192.1511308412624; Tue, 21 Nov 2017 15:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511308412; cv=none; d=google.com; s=arc-20160816; b=LHuSmevvFsJGN+1yZY0NyTM9+sU+shlOYfCzPHRQ3CLfYK6Cr4IFBdEn98Fk8LD4XV bMmCqc2BFtu02dchdOXGu2J1aQvzW8HxQANPITK71ghRrlJfRz8WHG1xFQ7wUaJY2don 4kMCXA1/uVgdtDdUZv/ups2tkRAgQ4zzjiVuohcJX9fEtWYpaJQQhiOyaXpGZfQUkJuk mkuVupM/E/SRKkkferu4mydIvj+dZ8CYxyEk3fHR5NH8Xqru5li864Zf6qEtMTEw5nq/ N6ZtIwk+TwkqbOzr4bQ41wcGkbCOrbOdLaYlF97nebt9nIPSE/R/vLGj7rl0c5qW8i62 8/Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=Yf5FYAOiDnWG9aze8yAqGDI16fwT8fFHoraEMbS43Z4=; b=DiXrjZZ8sDjajDos6EHWOEEBa8ep4YOeDQ/yd3KYCOWfJ31DGPdjV+9YwnQGXGk1l9 nMWTZgRSsyRJPDBRQIEeruLi6/6BOMFe90mjNJxTJssuBLnRDBzGS5kVbvCsg+WUyLrZ Nk/LB7eaO/udIYbT5uEqP5zd/FmNlNgvMHFUWCioGfqGrXNiHOBP/RqfktkZ/oGaUMjg ATj5N14UqtI7YcS67rqtgza7i7UpiPEZ3t3jaERy/Llp90EfpgEwRVm45zDGPfmDblqx QPZzOZGe7LjWD2h6Yasto6gkzbd7LRj3pmLyGe/y62b098cb0v6Aju+dqHvy4QADa5mO decw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=KoMQwhBZ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id r12si11748265pgp.586.2017.11.21.15.53.31; Tue, 21 Nov 2017 15:53:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=KoMQwhBZ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 65A157884D; Tue, 21 Nov 2017 23:53:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by mail.openembedded.org (Postfix) with ESMTP id 37CDC60778 for ; Tue, 21 Nov 2017 23:53:25 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id l22so12866787wrc.11 for ; Tue, 21 Nov 2017 15:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=ONPBt3DpAbVBKkTu2kvJHs8wFAVN/Pn1N8+yKMvY500=; b=KoMQwhBZlx0NIgDMfuUqbU79EgCy4xSixWiW5zMwWiN4VvKjTZli26bOtEx0qVxzzA nS6IewoqeqUL7Y6tb4S97E1etTa2zmEn5UESNY9ao4IqJ4qhfJLL3btrbIjx4E45Rd+p IJZz2s1CZmTWAaLh0fEij+L6mZ/joEhXIcHBgQK3LLxJ9hHsZr4MfOhK9VGIz34anT8a P2mT11WFN9eNyzWgkGMXwO6lUgBvgBIiIEvL3FsR8CYUXsel731rjZwwSv7iaizwzMel RypXI7Kj5XXKRzjM+Q5CRGzfLfz4WJO0BCvWUNJMxOWyywMUxCQ0xzbiSOWR2xzzhxne /2Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=ONPBt3DpAbVBKkTu2kvJHs8wFAVN/Pn1N8+yKMvY500=; b=J6urfImHnpfWNVeKb2+mVjoU9c6bHDYcldT3T4Uh/XKhbh1rVdHoILo9gi/DN640c5 EYEP8Du4V8qeRFSmEhYRi1TackxjFkHnJo8fHem32gQvntMTTjO3xcQVT/al1Pki8Tc0 XFMPNFCSCdhVqcZl0shBKeC8wckHVtjedqAU+j3QI+4I9xL5s7MzvZcl23sb73jWVgB4 Hc2ezxfP0MFq+I5JY9yikkhNYVQS6O8mH5snC2e9DZQraWphI1N31u5E734ryAXaRWZa hXLE0oizEeibAdW8TUqtPaDv3kVs7DVxuLuKLLHAVrBXL7bpJqk5+0AcSDYLH5+DFk8m jv+w== X-Gm-Message-State: AJaThX4T6Jxs1s5F1ozZ4CIj7vHPRSRDCOTZ73rK2s0/JXnY0OK/zbNn kqLB8TDp83C4si4UQzmJMsCyVTO0 X-Received: by 10.223.199.70 with SMTP id b6mr6613792wrh.25.1511308406718; Tue, 21 Nov 2017 15:53:26 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id d4sm2811606wmh.35.2017.11.21.15.53.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Nov 2017 15:53:25 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Tue, 21 Nov 2017 23:53:23 +0000 Message-Id: <20171121235323.29727-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH] bin_package: fail if ${S} doesn't actually contain anything X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org 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 --- meta/classes/bin_package.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/bin_package.bbclass b/meta/classes/bin_package.bbclass index a52b75be5c0..cbc9b1fa131 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} }