Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E8DAAE00DD9; Wed, 1 Aug 2018 03:37:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [192.103.53.11 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 0AE95E00DD1 for ; Wed, 1 Aug 2018 03:37:20 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id w71Ab2jp010269 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 1 Aug 2018 03:37:02 -0700 Received: from [128.224.162.218] (128.224.162.218) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 1 Aug 2018 03:37:01 -0700 To: tugouxp <13824125580@163.com>, References: <52c61bca.b741.164f4f8eeea.Coremail.13824125580@163.com> From: ChenQi Message-ID: <2cf2c9bb-b4a2-2339-bcbc-10038329d14e@windriver.com> Date: Wed, 1 Aug 2018 18:41:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <52c61bca.b741.164f4f8eeea.Coremail.13824125580@163.com> X-Originating-IP: [128.224.162.218] Subject: Re: Is there any way to remove some package frome IMAGE_INSTALL conditionally in local.conf? X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 10:37:23 -0000 Content-Type: multipart/alternative; boundary="------------6C619A090F583B40E9FD5B25" --------------6C619A090F583B40E9FD5B25 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit IMAGE_INSTALL_remove = "${@'package1 package2' if TCLIBC == 'glibc' else ''}" This only removes packages from IMAGE_INSTALL variable. So if packages are not removed, you may want to use PACKAGE_EXCLUDE to replace IMAGE_INSTALL_remove above. Best Regards, Chen Qi On 08/01/2018 06:11 PM, tugouxp wrote: > hi folks: > > i meet an problem that need keep TCLIBC both work in "musl" and > "glibc" environment , but a user-defined package cant work with > "glibc", so i need to remote them in the "IMAGE_INSTALL" variable, > but i don`t want to offer a seperate "image*.bb" files for this reason > because it may be cause the customer misunderstand, so i have a > thought to judge the "TCLIBC" and do the remove operation during > bitbake runtime in local.conf > like this in local.conf > > if TCLIBC == glibc > IMAGE_INSTALL_remove="package1 package2" > else > do nothing > endif > > so, how the above pseudo code be implemented in bitbake config files? > thanks for your support. > > > > > --------------6C619A090F583B40E9FD5B25 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 8bit
IMAGE_INSTALL_remove = "${@'package1 package2' if TCLIBC == 'glibc' else ''}"
This only removes packages from IMAGE_INSTALL variable.
So if packages are not removed, you may want to use PACKAGE_EXCLUDE to replace IMAGE_INSTALL_remove above.

Best Regards,
Chen Qi

On 08/01/2018 06:11 PM, tugouxp wrote:
hi folks:

   i meet an problem that need keep TCLIBC both work in "musl" and "glibc" environment , but a user-defined package cant work with "glibc", so i need to remote them in the "IMAGE_INSTALL" variable,
but i don`t want to offer a seperate "image*.bb" files for this reason because it may be cause the customer misunderstand, so i have a thought to judge the "TCLIBC" and do the remove operation during bitbake runtime in local.conf
like this in local.conf

  if TCLIBC == glibc
      IMAGE_INSTALL_remove="package1 package2"
 else
     do nothing
  endif

so, how the above pseudo code be implemented in bitbake config files?
thanks for your support.



 




--------------6C619A090F583B40E9FD5B25--