All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Quentin Schulz" <quentin.schulz@streamunlimited.com>
To: ayoub.zaki@googlemail.com
Cc: Yocto Project <yocto@yoctoproject.org>
Subject: Re: [yocto] Overwrite a bblcass globally
Date: Tue, 26 May 2020 16:42:18 +0200	[thread overview]
Message-ID: <20200526144218.xj6iwwf5gnewn5ei@qschulz> (raw)
In-Reply-To: <CA+-BmJZRJ_d+AsrWoZpsu4+ds3ug4BbhFWJ-09tL0rheq0zgcw@mail.gmail.com>

Hi Ayoub,

On Tue, May 26, 2020 at 04:36:13PM +0200, Ayoub Zaki via lists.yoctoproject.org wrote:
> Hi,
> 
> I would like to make changes on systemd.bblcass in my layer.
> 
> I can create new one e.g my-systemd.bbclass to overwrite the default one
> but this will not work since I want that ALL recipes in all layers I'm
> using to make usage of it.
> 
> are there ways to achieve this?
> 

BBPATH[1] is what's used to locate bbclasses. It's defined in your
conf/layer.conf.

You can either make sure your layer is parsed before the one having the
original systemd.bbclass (in BBLAYERS of conf/bblayers.conf) or prepend
to BBPATH instead of appending.

Although... It's usually bad practice because it means that if I were to use
two layers doing the same thing (overriding the same bbclass), the behavior
is kind of undefined depending on which order they are parsed.

Ideally, you should contribute back the modifications to upstream
systemd.bbclass, that way, no need to duplicate it and override it from
somewhere else.

[1] https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-BBPATH

Cheers,
Quentin

  reply	other threads:[~2020-05-26 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 14:36 Overwrite a bblcass globally Ayoub Zaki
2020-05-26 14:42 ` Quentin Schulz [this message]
2020-05-26 15:08   ` [yocto] " Ayoub Zaki
2020-05-26 14:45 ` Robert P. J. Day

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=20200526144218.xj6iwwf5gnewn5ei@qschulz \
    --to=quentin.schulz@streamunlimited.com \
    --cc=ayoub.zaki@googlemail.com \
    --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.