Skip to contentSkip to conversation

Updates around the UNPACKDIR variable

PATCH New Antonin Godard 1 participant 7 messages Mar 11, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover Updates around the UNPACKDIR variable

In the overview manual, for images that should mention UNPACKDIR, update them to SVGs. Using SVGs will allow maintainers to grep for variables and find it in SVGs images, since they are text. It also renders them much better in the doc.

Preview the files here:
https://lufi.bootlin.com/r/xvEBFSSCQH#havO3Q0FE2iwosN18yBE2NLy3jOsN+N9PcY34+Yj96Q=
https://lufi.bootlin.com/r/XXzoY9Pqym#dtnlf3eRPXJLkc8eElsdhaIhuzaMLs91vtqEJqcip1w=
https://lufi.bootlin.com/r/MpJfxZVBKY#F922qn9mRFKqtVMsQRCDYlDEv/qGOXDQstedRtM2F84=
https://lufi.bootlin.com/r/QTT_WFgD49#zs8s9pgYGbogUZR/7q8KHVV2jTwrEuSR1Z0wxqM0Yao=

---
Changes in v2:
- The converted SVG were a bit off because of all of the multiple arrows
that were misaligned with the text. Instead of using extra objects to
do this, use characters that act as arrows and are never misaligned to
the text.
- Drop the UNPACKDIR description patch. I'll send it separately as it
needs more reviews and I don't want it to block this series.
- Reviews from Quentin (thanks!):
- Be more precise about what changed in the figures in the commit log.
- Fix the arrow direction in configuration-compile-autoreconf.png,
where is also used in configure/compile/install in different ways.
- Split commit for PR removal and UNPACKDIR addition in the build dir description list.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Antonin Godard (6):
overview-manual: convert source-fetching.png to svg and fix UNPACKDIR
overview-manual: convert patching.png to svg
overview-manual: convert configuration-compile-autoreconf.png to svg
overview-manual: convert analysis-for-package-splitting.png to svg overview-manual/concepts: remove PR from the build dir list overview-manual/concepts: add UNPACKDIR in the directory description

 documentation/overview-manual/concepts.rst         |   24 +-
 .../figures/analysis-for-package-splitting.png     |  Bin 68434 -> 0 bytes
 .../figures/configuration-compile-autoreconf.png   |  Bin 70877 -> 0 bytes
 documentation/overview-manual/figures/patching.png |  Bin 57414 -> 0 bytes
 .../overview-manual/figures/source-fetching.png    |  Bin 46896 -> 0 bytes
 .../svg/analysis-for-package-splitting.svg         | 1862 ++++++++++++++++++++
 .../svg/configuration-compile-autoreconf.svg       | 1497 ++++++++++++++++
 documentation/overview-manual/svg/patching.svg     | 1224 +++++++++++++
 .../overview-manual/svg/source-fetching.svg        | 1094 ++++++++++++
 9 files changed, 5689 insertions(+), 12 deletions(-)

---
base-commit: e608902ffae3af5ab0c5308b0550e49a790482f0
change-id: 20250217-overview-figures-ead01baaeebf

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>
#1 lore raw

PATCH v2 1/6 overview-manual: convert source-fetching.png to svg and fix UNPACKDIR

From: Antonin Godard <[email protected]>

- Convert the png file to an SVG file.
- Add the new UNPACKDIR directory to the image.
- Remove ${PR} from WORKDIR value, after cc83e4548465 ("bitbake.conf:
Drop PE and PR from WORKDIR and STAMP") on OE-Core.
- Change S value to BP (equal to ${BPN}-${PV}, but more accurate).-

This fixes [YOCTO #15730].

---
 documentation/overview-manual/concepts.rst    |    2 +-
 .../figures/source-fetching.png               |  Bin 46896 -> 0 bytes
 .../overview-manual/svg/source-fetching.svg   | 1094 +++++++++++++++++
 3 files changed, 1095 insertions(+), 1 deletion(-)
documentation/overview-manual/concepts.rst +1 -1
index d1fd6befc8..55669cd3f6 100644
@@ -683,7 +683,7 @@ Source Fetching
 The first stages of building a recipe are to fetch and unpack the source
 code:
 
-.. image:: figures/source-fetching.png
+.. image:: svg/source-fetching.*
    :width: 100%
 
 The :ref:`ref-tasks-fetch` and :ref:`ref-tasks-unpack` tasks fetch
documentation/overview-manual/figures/source-fetching.png deleted binary +0 -0
deleted file mode 100644
index bf5e187b2b76b28dbba72eedf8b9d8d1ba1854d0..0000000000000000000000000000000000000000
GIT binary patch
documentation/overview-manual/svg/source-fetching.svg new file +1094 -0

1,094 lines not on this page · raw message

Signature · 1 line
2.47.0
#2 lore raw

PATCH v2 2/6 overview-manual: convert patching.png to svg

In reply to Antonin Godard

From: Antonin Godard <[email protected]>

- Convert the png file to an SVG file.
- Add the new UNPACKDIR directory to the image.
- Remove ${PR} from WORKDIR value, after cc83e4548465 ("bitbake.conf:
Drop PE and PR from WORKDIR and STAMP") on OE-Core.
- Change S value to BP (equal to ${BPN}-${PV}, but more accurate).-

---
 documentation/overview-manual/concepts.rst    |    2 +-
 .../overview-manual/figures/patching.png      |  Bin 57414 -> 0 bytes
 .../overview-manual/svg/patching.svg          | 1224 +++++++++++++++++
 3 files changed, 1225 insertions(+), 1 deletion(-)
documentation/overview-manual/concepts.rst +1 -1
index 55669cd3f6..5c6af847e5 100644
@@ -764,7 +764,7 @@ Patching
 Once source code is fetched and unpacked, BitBake locates patch files
 and applies them to the source files:
 
-.. image:: figures/patching.png
+.. image:: svg/patching.*
    :width: 100%
 
 The :ref:`ref-tasks-patch` task uses a
documentation/overview-manual/figures/patching.png deleted binary +0 -0
deleted file mode 100644
index 80fba7e7cf1e49e0fd0ea033c73f6edaac0d7967..0000000000000000000000000000000000000000
GIT binary patch
documentation/overview-manual/svg/patching.svg new file +1224 -0

1,224 lines not on this page · raw message

Signature · 1 line
2.47.0
#3 lore raw

PATCH v2 3/6 overview-manual: convert configuration-compile-autoreconf.png to svg

In reply to Antonin Godard

From: Antonin Godard <[email protected]>

- Convert the png file to an SVG file
- Add the UNPACKDIR reference.
- Remove ${PR} from WORKDIR value, after cc83e4548465 ("bitbake.conf:
Drop PE and PR from WORKDIR and STAMP") on OE-Core.
- Change S value to BP (equal to ${BPN}-${PV}, but more accurate).

---
 documentation/overview-manual/concepts.rst    |    2 +-
 .../configuration-compile-autoreconf.png      |  Bin 70877 -> 0 bytes
 .../svg/configuration-compile-autoreconf.svg  | 1497 +++++++++++++++++
 3 files changed, 1498 insertions(+), 1 deletion(-)
documentation/overview-manual/concepts.rst +1 -1
index 5c6af847e5..a4752eaee5 100644
@@ -805,7 +805,7 @@ After source code is patched, BitBake executes tasks that configure and
 compile the source code. Once compilation occurs, the files are copied
 to a holding area (staged) in preparation for packaging:
 
-.. image:: figures/configuration-compile-autoreconf.png
+.. image:: svg/configuration-compile-autoreconf.*
    :width: 100%
 
 This step in the build process consists of the following tasks:
documentation/overview-manual/figures/configuration-compile-autoreconf.png deleted binary +0 -0
deleted file mode 100644
index 043d195a33c8cfd87406139f8071283678f5c654..0000000000000000000000000000000000000000
GIT binary patch
documentation/overview-manual/svg/configuration-compile-autoreconf.svg new file +1497 -0

1,497 lines not on this page · raw message

Signature · 1 line
2.47.0
#4 lore raw

PATCH v2 4/6 overview-manual: convert analysis-for-package-splitting.png to svg

In reply to Antonin Godard

From: Antonin Godard <[email protected]>

- Convert the png file to an SVG file
- Add the UNPACKDIR reference.
- Remove ${PR} from WORKDIR value, after cc83e4548465 ("bitbake.conf:
Drop PE and PR from WORKDIR and STAMP") on OE-Core.
- Change S value to BP (equal to ${BPN}-${PV}, but more accurate).

---
 documentation/overview-manual/concepts.rst    |    2 +-
 .../analysis-for-package-splitting.png        |  Bin 68434 -> 0 bytes
 .../svg/analysis-for-package-splitting.svg    | 1862 +++++++++++++++++
 3 files changed, 1863 insertions(+), 1 deletion(-)
documentation/overview-manual/concepts.rst +1 -1
index a4752eaee5..f0e2eb2249 100644
@@ -861,7 +861,7 @@ Package Splitting
 After source code is configured, compiled, and staged, the build system
 analyzes the results and splits the output into packages:
 
-.. image:: figures/analysis-for-package-splitting.png
+.. image:: svg/analysis-for-package-splitting.*
    :width: 100%
 
 The :ref:`ref-tasks-package` and
documentation/overview-manual/figures/analysis-for-package-splitting.png deleted binary +0 -0
deleted file mode 100644
index 0cb038666bebabfbefea65ae542187f22be895bb..0000000000000000000000000000000000000000
GIT binary patch
documentation/overview-manual/svg/analysis-for-package-splitting.svg new file +1862 -0

1,862 lines not on this page · raw message

Signature · 1 line
2.47.0
#5 lore raw

PATCH v2 5/6 overview-manual/concepts: remove PR from the build dir list

In reply to Antonin Godard

From: Antonin Godard <[email protected]>

PR was removed by cc83e4548465 ("bitbake.conf: Drop PE and PR from WORKDIR and STAMP") on OE-Core.

---
 documentation/overview-manual/concepts.rst | 3 ---
 1 file changed, 3 deletions(-)
documentation/overview-manual/concepts.rst +0 -3
index f0e2eb224..ccbe2f47f 100644
@@ -736,9 +736,6 @@ following list describe the :term:`Build Directory`'s hierarchy:
    -  :term:`PV`: The version of the
       recipe used to build the package.
 
-   -  :term:`PR`: The revision of the
-      recipe used to build the package.
-
 -  :term:`S`: Contains the unpacked source
    files for a given recipe.
 
Signature · 1 line
2.47.0
#6 lore raw

PATCH v2 6/6 overview-manual/concepts: add UNPACKDIR in the directory description

In reply to Antonin Godard

From: Antonin Godard <[email protected]>

Mention that UNPACKDIR is used as a location to unpack the source code, and that S is the final location of the source code. This is deliberately vague, because as there are multiple instances of how these directories can be defined and used.

The proper explanation of how the UNPACKDIR and S directories interact is left to the reference manual, under the UNPACKDIR variable description.

---
 documentation/overview-manual/concepts.rst | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
documentation/overview-manual/concepts.rst +9 -6
index ccbe2f47f..e4d806f98 100644
@@ -704,10 +704,10 @@ a defined structure. For additional general information on the
 the Yocto Project Reference Manual.
 
 Each recipe has an area in the :term:`Build Directory` where the unpacked
-source code resides. The :term:`S` variable points to this area for a recipe's
-unpacked source code. The name of that directory for any given recipe is
-defined from several different variables. The preceding figure and the
-following list describe the :term:`Build Directory`'s hierarchy:
+source code resides. The :term:`UNPACKDIR` variable points to this area for a
+recipe's unpacked source code, and has the default ``sources-unpack`` name. The
+preceding figure and the following list describe the :term:`Build Directory`'s
+hierarchy:
 
 -  :term:`TMPDIR`: The base directory
    where the OpenEmbedded build system performs all its work during the
@@ -736,8 +736,11 @@ following list describe the :term:`Build Directory`'s hierarchy:
    -  :term:`PV`: The version of the
       recipe used to build the package.
 
--  :term:`S`: Contains the unpacked source
-   files for a given recipe.
+-  :term:`UNPACKDIR`: Contains the unpacked source files for a given recipe.
+
+-  :term:`S`: Contains the final location of the source code.
+
+   The default value for :term:`BP` is ``${BPN}-${PV}`` where:
 
    -  :term:`BPN`: The name of the recipe
       used to build the package. The :term:`BPN` variable is a version of
Signature · 1 line
2.47.0