From patchwork Thu Jun 8 12:58:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 103384 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp2425042qgd; Thu, 8 Jun 2017 05:58:38 -0700 (PDT) X-Received: by 10.98.86.132 with SMTP id h4mr24599826pfj.205.1496926718365; Thu, 08 Jun 2017 05:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496926718; cv=none; d=google.com; s=arc-20160816; b=GzK2z16sdA/jN8dUCLWlkeYyB56zFPOW3UZY4zvGpVBlHb/DoPefvbxZo45yaB3xMq DxkH66DF4kbmTM4Rv1JAJieuuIaSaxqwTJ9M0eo20nGrdSgxxR6BO7fr0FyqyTLKfKVu gBQ69wRcb02EKPIytspkUbwdmSfOrlv7/eVULNnkRkFU6+AofxLFIpEzj1eaTc5rk4qw TUVQkoZ/CvWKvw+6FG+QxpLi5dCBqD7buqk0naw6KvxgqLz1cNBIHjjSti4Wz2ztrT0p M351JLHV+EDUixbiDdHbrm9qiwSqkkF7uR3UTXots6YAGAVTmaasRRqzQ4sz4NYHY4D2 J1wQ== 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=Ll3x7BDqTpwvgVpLzKvyAUcqfqmSwS+3dm5Bw712FYc=; b=mNvqJADCB+ExOTYVgpHSXt9IKZQQCRL2nwtS17DrJGV1Z6NlcAF0oC/WwtK8pIMQAH UtJofkpRAnHvPctSRxuNMKtEGP+1mkySlWqLNh7W5facifTNrDnsIAPt4O4TIBzHSaOS SyB/K5o3yn0I++p2DIxiyFbyjpUudQL3UtA1HD2USSctwYDQI2jbmsDxgjjjfIFDhXEE xPR6v4aciElyJg6FCPL9httsnt4NFj3cktv8fEDwQcUxRRE2WysXnUe4QGRSEN6vX+Oo VRS3UATQzDzZpwRt0YFQP42x6h9Z7YWLtTIxW8/f72pjnLXPxZDCdB8RMJUdYcoXwnOJ t1pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com; 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 l2si4332656plk.260.2017.06.08.05.58.38; Thu, 08 Jun 2017 05:58:38 -0700 (PDT) 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; 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 ECA177821F; Thu, 8 Jun 2017 12:58:33 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by mail.openembedded.org (Postfix) with ESMTP id 19E0F781F6 for ; Thu, 8 Jun 2017 12:58:31 +0000 (UTC) Received: by mail-wm0-f50.google.com with SMTP id n195so30546907wmg.1 for ; Thu, 08 Jun 2017 05:58:32 -0700 (PDT) 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=DjU9fkkNLOwiCNSeLWSkuenwk8JX3pDLqe68ZUcmKX4=; b=MnzhHXMuaL+2ZP4us81niBev9o5iva3B7F02fBSLaxw/oORTsdr9oLNO0OT6lpmKfH XiDHnGrPRR7bW+HiVkT3U+MP2S8ocYpwKl2gKutRdkk6v7j4QRPupGybqtQ7MgExezMO 0WoBOY3Bq/M6eA7gD/ztW3CHu077RWxQfR00qaOJcHq7jdS+1FYnSGATA5iWADjcHSsl xUbWQpb64f4NXnIMLIPtJj0QovanHWFG8jVQHiF1sdS/GgPFDp7Qf+bBEQaSrMKL9Hga fTd+u2s872ibsoEZTy/c5l0+La1b+CP9qkeu/3my2X4ebyTGmEWeORib/D+dD/pJbewY x/1Q== 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=DjU9fkkNLOwiCNSeLWSkuenwk8JX3pDLqe68ZUcmKX4=; b=KXWROjUwck9ljMS0Y3yNfVW0k+iL6mgeo2InrZgZaR66jDUTakQYMH4zC75s3kwiqj w2Pw69IHPIPGlicyzigK0rgVo+rOpRYxskrFXz3+ijy4eM/+eEsLPbUkJjIi3e/afHwV v9O81N2SX4/GpMLOiPIA7t21wZHdW/Dp0r92r56aIPZYkTa45HuRvO/k5MYo3UsU4npo m9p1ZHewbqvBLAgfm+7gvxSG7X/6O5a9ptVXxKrZV1uHV50axEwMLnwiylYq8TOyL1zu HW6Fn40sDus1KNKbeIDBswMUFAOZB0ONa/0cXxIY3lGP7KDLgcqSt9G80SMCGEZQPWiZ XoyA== X-Gm-Message-State: AKS2vOxWF3AQEXp3heCQwh3rteRfBCy8O6bCPKY95sCZV2CY8+fX3dZO XPsJRIlAPKeIz/nz5lU= X-Received: by 10.28.45.13 with SMTP id t13mr3354194wmt.98.1496926711785; Thu, 08 Jun 2017 05:58:31 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id m14sm4918503wmi.2.2017.06.08.05.58.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Jun 2017 05:58:31 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 8 Jun 2017 13:58:29 +0100 Message-Id: <1496926709-20617-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.8.1 Subject: [OE-core] [PATCH] opkg-utils: if Python support is disabled, delete the Python scripts 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 To make it obvious what is lost when python is disabled, actually delete the scripts so the user can't attempt to use them. Signed-off-by: Ross Burton --- meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 5 +++++ 1 file changed, 5 insertions(+) -- 2.8.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb index 06710b5..ed5980b 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb @@ -19,6 +19,7 @@ S = "${WORKDIR}/git" TARGET_CC_ARCH += "${LDFLAGS}" +# For native builds we use the host Python PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-subprocess python3-pickle python3-compression python3-textutils python3-stringold" PYTHONRDEPS_class-native = "" @@ -31,6 +32,10 @@ do_install() { if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then rm -f "${D}${bindir}/update-alternatives" fi + + if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm + fi } do_install_append_class-target() {