All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonin Godard <antonin.godard@bootlin.com>
To: docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Antonin Godard <antonin.godard@bootlin.com>
Subject: [PATCH] dev-manual/new-recipe.rst: rework Unpacking Code section
Date: Thu, 16 Apr 2026 16:03:54 +0200	[thread overview]
Message-ID: <20260416-unpacking-code-v1-1-19bc7d4fd7ee@bootlin.com> (raw)

There were recent changes to how Bitbake/OECore unpacks code.
Importantly we no longer need to set S when fetching with the Git or
other fetchers. Rework this section and mention UNPACKDIR/BP.

[YOCTO #16049]

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/dev-manual/new-recipe.rst          | 24 +++++++++++++-----------
 documentation/migration-guides/migration-5.3.rst |  2 ++
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index 5e9498afc..82c7ff4b2 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -408,17 +408,19 @@ During the build, the
 the source with ``${``\ :term:`S`\ ``}``
 pointing to where it is unpacked.
 
-If you are fetching your source files from an upstream source archived
-tarball and the tarball's internal structure matches the common
-convention of a top-level subdirectory named
-``${``\ :term:`BPN`\ ``}-${``\ :term:`PV`\ ``}``,
-then you do not need to set :term:`S`. However, if :term:`SRC_URI` specifies to
-fetch source from an archive that does not use this convention, or from
-an SCM like Git or Subversion, your recipe needs to define :term:`S`.
-
-If processing your recipe using BitBake successfully unpacks the source
-files, you need to be sure that the directory pointed to by ``${S}``
-matches the structure of the source.
+By default, the value of ``${``\ :term:`S`\ ``}`` is already set to where the
+:term:`OpenEmbedded Build System` will unpack the source code, by using the
+value of :term:`UNPACKDIR` and :term:`BP`.
+
+You typically don't need to set :term:`S` explicitly. If processing your recipe
+using BitBake successfully unpacks the source files, you can verify that the
+directory pointed to by ``${S}`` is the root of your source code.
+
+.. note::
+
+   It used to be that when fetching with Git, recipes should explicitly set
+   :term:`S` to ``${WORKDIR}/git``: this is no longer the case. See
+   :ref:`ref-migration-5-3-s-workdir-git` for more information.
 
 Patching Code
 =============
diff --git a/documentation/migration-guides/migration-5.3.rst b/documentation/migration-guides/migration-5.3.rst
index 464006aaa..8746141cd 100644
--- a/documentation/migration-guides/migration-5.3.rst
+++ b/documentation/migration-guides/migration-5.3.rst
@@ -54,6 +54,8 @@ changed to::
 
    S = "${UNPACKDIR}/something"
 
+.. _ref-migration-5-3-s-workdir-git:
+
 ``S = ${WORKDIR}/git`` and ``S = ${UNPACKDIR}/git`` should be removed
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

---
base-commit: 560bc33c0c2ecd60d68ba06a2edff8c25b9a3f90
change-id: 20260416-unpacking-code-acfdba02fbc8



             reply	other threads:[~2026-04-16 14:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 14:03 Antonin Godard [this message]
2026-04-24  8:42 ` [PATCH] dev-manual/new-recipe.rst: rework Unpacking Code section 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=20260416-unpacking-code-v1-1-19bc7d4fd7ee@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=thomas.petazzoni@bootlin.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 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.