public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <bhstalel@gmail.com>, <docs@lists.yoctoproject.org>
Subject: Re: [docs][PATCH 2/2] ref-manual/classes.rst: add diagram for classes used by base.bbclass
Date: Thu, 25 Sep 2025 16:29:59 +0200	[thread overview]
Message-ID: <DD1YBMXM5MUJ.2N2XDSIL5KN6P@bootlin.com> (raw)
In-Reply-To: <20250921164306.53501-3-bhstalel@gmail.com>

On Sun Sep 21, 2025 at 6:43 PM CEST, BELHADJ SALEM Talel via lists.yoctoproject.org wrote:
> The diagram is created using draw.io, I used it also
> to create the BitBake Tasks Map, and I was informed by
> Michael back then to use Inkscape, but I was not successful
> learning it, and that led to me postponing lot of
> contributions. So, I thought contributing draw.io SVGs
> is better than nothing, one day I will fix them with
> Inkscape.

> Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com>
> ---
>  documentation/ref-manual/classes.rst           |   7 +++++++
>  .../figures/base_bbclass_inherits.png          | Bin 0 -> 168001 bytes
>  .../ref-manual/svg/base_bbclass_inherits.svg   |   4 ++++
>  3 files changed, 11 insertions(+)
>  create mode 100644 documentation/ref-manual/figures/base_bbclass_inherits.png
>  create mode 100644 documentation/ref-manual/svg/base_bbclass_inherits.svg
>
> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
> index 791c6b2ef..703ad98dc 100644
> --- a/documentation/ref-manual/classes.rst
> +++ b/documentation/ref-manual/classes.rst
> @@ -191,6 +191,13 @@ The following actions, among others, are handled by this class:
>  - Handle the provided license via :term:`LICENSE` and :term:`LIC_FILES_CHKSUM` variables
>  - Prepare the native recipe that correspond to the scheme set in :term:`SRC_URI`
>  
> +Besides that, the :ref:`ref-classes-base` class inherits more classes to provide more
> +utilities, set up toolchain variables, add more tasks, and more. The following diagram
> +shows how :ref:`ref-classes-base` is related to other classes:
> +
> +.. image:: figures/base_bbclass_inherits.png

Other places that use SVGs make the following call:

  .. image:: svg/base_bbclass_inherits.*
     :width: 100%

Can you use that instead? It will render the file as non-pixelated in the html
page, which is nicer.

> +   :align: center

Some comments on the diagram:

- I think it's great, it shows what you described in the the line above, i.e.
  the graph of inheritance.

- I'm not sure representing the classes-global/ and classes/ directories add
  much to the diagram. In fact, I would remove the directories here and just
  represent the inheritance between classes.

- This class can evolve over time, and maybe more classes will be inherited in
  the future. So I don't think we need to be exhaustive here. Instead I would do
  something like:

  base.bbclass --------------------> patch.bbclass
                inherit          |-> staging.bbclass
                                 |-> mirrors.bbclass
                                 |-> utils.bbclass
                                 |-> utility-tasks.bbclass
                                 |-> logging.bbclass
                                 \-> ...

  This is just to give the idea of including the "..." at the end. Users can read
  the file if they want the exaustive list.

- I would not include the terminal.bbclass inherit. Classes can include other
  classes but I think the main point of this diagram is to show the basic
  inherits of the base class.

- I like the TOOLCHAIN/TOOLCHAIN_NATIVE mention.

>  .. _ref-classes-bash-completion:
>  
>  ``bash-completion``
> diff --git a/documentation/ref-manual/figures/base_bbclass_inherits.png b/documentation/ref-manual/figures/base_bbclass_inherits.png

No need to include the PNG here. SVGs are automatically converted to PNGs.

[...]
> diff --git a/documentation/ref-manual/svg/base_bbclass_inherits.svg b/documentation/ref-manual/svg/base_bbclass_inherits.svg
> new file mode 100644
> index 000000000..f223eb4d1
> --- /dev/null
> +++ b/documentation/ref-manual/svg/base_bbclass_inherits.svg
> @@ -0,0 +1,4 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!-- Do not edit this file with editors other than draw.io -->

Hmm... if we really can't open that with Inkscape that's a problem from
maintenance :/ I tried opening it with inkscape and indeed, I can't edit the
text and so on. Maybe there's an option in draw.io for exporting for other
editors? Otherwise sadly we can't merge this, as we wouldn't be able to
maintain it easily.

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2025-09-25 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-21 16:43 [docs][PATCH 0/2] Add more details about the behaviour of the base class Talel BELHAJ SALEM
2025-09-21 16:43 ` [docs][PATCH 1/2] ref-manual/classes.rst: add details about actions done by base.bbclass Talel BELHAJ SALEM
2025-09-22 14:32   ` Antonin Godard
2025-09-22 18:05     ` Talel BELHADJ SALEM
     [not found]     ` <1867ACF8FB1FE7F2.23261@lists.yoctoproject.org>
2025-09-22 18:12       ` Talel BELHADJ SALEM
2025-09-23 16:15         ` Antonin Godard
2025-09-25 14:55           ` Talel BELHADJ SALEM
2025-09-25 15:11             ` Antonin Godard
2025-09-21 16:43 ` [docs][PATCH 2/2] ref-manual/classes.rst: add diagram for classes used " Talel BELHAJ SALEM
2025-09-25 14:29   ` Antonin Godard [this message]
2025-09-25 18:00     ` Gyorgy Sarvari
2025-09-30 11:18       ` Talel BELHADJ SALEM
2025-10-02  8:06         ` Antonin Godard

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=DD1YBMXM5MUJ.2N2XDSIL5KN6P@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=bhstalel@gmail.com \
    --cc=docs@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox