From: Michael Opdenacker <michael.opdenacker@bootlin.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
openembedded-architecture
<openembedded-architecture@lists.openembedded.org>
Cc: docs <docs@lists.yoctoproject.org>
Subject: Re: [docs] WOKRDIR change transition guide/notes
Date: Thu, 23 May 2024 11:05:07 +0200 [thread overview]
Message-ID: <d8ef3518-b299-4ea5-88df-85dde63bea3a@bootlin.com> (raw)
In-Reply-To: <4760bef7826c511c0a664e4e58ab5560cd340358.camel@linuxfoundation.org>
Hi Richard,
On 5/15/24 at 15:12, Richard Purdie wrote:
> Now that there is a roughly ready patchset for this I wanted to write
> down a quick guide to converting recipes.
>
> S = ${WORKDIR}
> ==============
>
> If a recipe has S set to be WORKDIR this is no longer supported.
> Currently you'll see warnings, those will become errors very soon and
> even now, the code probably isn't safe to work like that. The recipe
> should be changed to:
>
> S = "${WORKDIR}/sources"
> UNPACKDIR = "${S}"
>
> Any WORKDIR references where files from SRC_URI are referenced should
> be changed to S. These are commonly in do_compile, do_install and
> LIC_FILES_CHKSUM.
>
>
> WORKDIR references in the recipe
> ================================
>
> WORKDIR references in other recipes need auditing. If they reference
> files from SRC_URI, they likely need changing to UNPACKDIR. These are
> commonly in do_compile and do_install for things like service or
> configuration files.
>
> One unusual one is ${WORKDIR}/${BP} should probably be ${S}.
>
> References to "../" in LIC_FILES_CHKSUM or elsewhere may need changing
> to UNPACKDIR.
>
> References to WORKDIR in sed commands are usually left as they are now.
>
>
> General notes
> =============
>
> Files from do_unpack now unpack to WORKDIR/sources-unpack/ rather than
> WORKDIR/.
>
> If S is set to a subdirectory under WORKDIR and that subdirectory
> exists in sources-unpack after do_unpack runs, it is moved to WORKDIR.
> This means S = "${WORKDIR}/${BP}", S = "${WORKDIR}/git" and also deeper
> paths continue to work as expected without changes. We cannot use
> symlinks to do this as it breaks autotools based recipes in weird and
> interesting ways I didn't feel like exploring.
>
> At this time, keeping all sources under sources-unpack isn't being
> considered as it means more invasive recipes changes. The key issue is
> separating the unpack task output from WORKDIR which this change
> achieves.
>
> Previously, S was always created but after the recent changes it is
> not. This means the check in do_unpack_qa triggers where S is not
> created by a recipe where as it did not before. This can mean adding a
> S definition to a recipe that only uses file:// SRC_URI entries.
>
> Building C files from UNPACKDIR without setting S to point at it does
> not work as our debug prefix mapping doesn't handle that.
>
> devtool and recipetool have been updated to handle this and their
> support for S = WORKDIR and oe-local-files has been removed.
Thanks for these guidelines.
I will first submit a patch to start migration and release notes for
5.1, and then will add your notes to the new migration notes.
Cheers
Michael.
--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2024-05-23 9:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 13:12 WOKRDIR change transition guide/notes Richard Purdie
2024-05-23 9:05 ` Michael Opdenacker [this message]
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=d8ef3518-b299-4ea5-88df-85dde63bea3a@bootlin.com \
--to=michael.opdenacker@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=openembedded-architecture@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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