All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Draszik" <git@andred.net>
To: yocto@yoctoproject.org
Subject: Re: Check IMAGE_FEATURES content in recipe
Date: Thu, 10 May 2018 09:54:26 +0100	[thread overview]
Message-ID: <1525942466.5115.26.camel@andred.net> (raw)
In-Reply-To: <d2ed93c9-f746-6e37-c959-66a5eebfb93d@windriver.com>

Hi,

To expand on that - the idea is that (binary) packages shall not be affected
by the image, meaning that you should be able to install the exact same
(binary) package in different images. If you were able to access image
specific variables inside your package recipe (and change behaviour/contents
of your package based on the image), this wouldn't be possible any more.

In other words, an image is just a collection of a different set / number of
packages to be installed, but each individual package itself is the same for
all images.

Cheers,
Andre'

On Thu, 2018-05-10 at 16:46 +0800, ChenQi wrote:
> Hi Piotr,
> 
> VAR set in recipe A cannot be accessed by recipe B.
> 
> For 'read-only-rootfs' image feature, tweaks are done in functions 
> executed after generating rootfs.
> meta/classes/rootfs-postcommands.bbclass:ROOTFS_POSTPROCESS_COMMAND += 
> '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", 
> "read_only_rootfs_hook; ", "",d)}'
> 
> Can you use a similar approach to solve your problem?
> 
> Best Regards,
> Chen Qi
> 
> On 05/10/2018 03:37 PM, Piotr Piwko wrote:
> > Hi,
> > 
> > I would like to check in my recipe if created image is read-only or 
> > not. In order to do so, I use the following condition which I would 
> > inside poky sources:
> > 
> > if ${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', 'true', 
> > 'false', d)}; then
> > 
> > However it seems that IMAGE_FEATURES variable is not exported to the 
> > higher recipes. I also confirmed it's content by executing:
> > 
> > bitbake my-image -e | grep IMAGE_FEATURES
> > 
> > Is there any possibility to export this variable to my recipe or 
> > somehow check the particular image feature?
> > 
> > Thank you in advance for help.
> > 
> > -- 
> > Piotr Piwko
> > http://www.embedded-engineering.pl/
> > 
> > 
> 
> 


  reply	other threads:[~2018-05-10  8:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  7:37 Check IMAGE_FEATURES content in recipe Piotr Piwko
2018-05-10  8:46 ` ChenQi
2018-05-10  8:54   ` André Draszik [this message]
2018-05-10  8:59   ` Piotr Piwko
2018-05-10  9:22     ` Burton, Ross
2018-05-10 15:06       ` Marcelo E. Magallon
2018-05-11  0:04         ` Paul Eggleton
2018-05-10 10:54     ` Alexander Kanavin
2018-05-10 11:29       ` Piotr Piwko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525942466.5115.26.camel@andred.net \
    --to=git@andred.net \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.