public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Baurzhan Ismagulov <ibr@radix50.net>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: 'IMAGE_FEATURES' in Isar
Date: Fri, 13 Apr 2018 13:27:31 +0200	[thread overview]
Message-ID: <20180413112731.GF6488@yssyq.radix50.net> (raw)
In-Reply-To: <9e911992-c9ff-647d-ff04-2a400677d6e9@siemens.com>

On Thu, Apr 12, 2018 at 05:35:17PM +0200, Claudius Heine wrote:
> Alex brought up the IMAGE_FEATURES idea and this thread just discuss it and
> to answer the questions: What else could IMAGE_FEATURES be used for? And
> does it make sense to use it to specify if the kernel should be part of the
> image or not?

Ah, now I see your point.

As I understand it, Alex's point is to introduce an additional, breve, binary
porcelain for the user. Adding or removing hairy IMAGE_INSTALL lines should be
hidden in the plumbing.

E.g., poky/meta/recipes-sato/images/core-image-sato.bb:

IMAGE_FEATURES += "splash package-management x11-base x11-sato \
ssh-server-dropbear hwcodecs"

When we have that many optional things, copy-pasting them in multiple recipes
would be an error-prone process and a maintenance problem due to duplication of
IMAGE_INSTALL += lines that have all to be updated if anything changes.

In our case, local.conf would have IMAGE_FEATURES = "kernel" by default. Of
course, we can only go in that direction if something like
IMAGE_FEATURES_isar-image-base = "" would work (maybe it does [1]). It isn't
very Isar-like, since Yocto is focused on one config at a time, and we
explicitly aim at multiple, diverse deliverables from the beginning. Ideally,
I'd like to see such binary porcelain in a recipe (not touching machine and
distro configs being the goal).


> >>   - Cleanup steps like localepurge, and apt-get clean
> >
> >Just do it always, as in your patches?
> 
> You meant the '*-configscripts.sh'?
> 
> AFAIK the purpose is to try to move most of this stuff out of there and into
> a 'system-setup-package' of sorts. At lease for all of those things, that
> don't require doing it at the end of everything.

Agree with the latter (e.g., root password, hostname).

Do I understand correctly that localepurge and apt-get clean have to be done at
the end? If yes, then they aren't suitable for system-setup-package. Then,
where should those go?

Regarding whether that should be done in IMAGE_FEATURES, my opinion is still
that specifically localepurge, apt-get clean should always be performed. IOW, I
don't think they belong to IMAGE_FEATURES.


> The rest of those steps (like those cleanup commands) should be split up
> into smaller scripts each with just one task and then trigger them via
> IMAGE_FEATURES after all packages were installed. Then the difference
> between raspbian and debian might just be some different entries in the
> IMAGE_FEATURES (or DISTRO_FEATURES) variable. At least thats my current idea
> here.

We can discuss those when we have a specific example.


> >>   - Removal of apt and other possible reduction tasks
> >
> >Additional recipe some images depend on?
> 
> Removal of apt and other reduction steps should be done after all packages
> are installed using apt. Doing that in some other recipe/debian package just
> doesn't work.

Ok, so it has to be a task. Yocto does it by default and provides
IMAGE_FEATURES += "package-management". I think mimicking that would be an
advantage here.


> >>The other question might be if having a kernel should be implemented as a
> >>IMAGE_FEATURE or rather a setting in the machine.conf?

I'd like to provide a binary way to customize it for every image without
touching machine or distro confs.


> >We already have it in IMAGE_INSTALL for isar-image-base. Doesn't it work if the
> >kernel is removed from there?
> 
> This is how I do it in the current "Optional kernel" patchset.

After I see the implementation, I think stacking complex lines in multiple
images has disadvantages compared to binary options.


References:

1. https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html#conditional-syntax-overrides


With kind regards,
Baurzhan.

  reply	other threads:[~2018-04-13 11:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 12:59 Claudius Heine
2018-04-12 14:26 ` Baurzhan Ismagulov
2018-04-12 15:35   ` Claudius Heine
2018-04-13 11:27     ` Baurzhan Ismagulov [this message]
2018-04-16  8:17       ` Claudius Heine
2018-04-16  8:36         ` Claudius Heine

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=20180413112731.GF6488@yssyq.radix50.net \
    --to=ibr@radix50.net \
    --cc=isar-users@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox