diff mbox series

base/bitbake.conf: use default assigment for UNPACKDIR

Message ID 20240531102742.3550748-1-samuli.piippo@qt.io
State New
Headers show
Series base/bitbake.conf: use default assigment for UNPACKDIR | expand

Commit Message

Samuli Piippo May 31, 2024, 10:27 a.m. UTC
This lets recipes in other layers add weak default assignment as
  UNPACKDIR ??= "${WORKDIR}"
which allows the recipes to work also with older Yocto releases
without overriding the default value used in styhead.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie May 31, 2024, 10:56 a.m. UTC | #1
On Fri, 2024-05-31 at 10:27 +0000, Samuli Piippo via
lists.openembedded.org wrote:
> This lets recipes in other layers add weak default assignment as
>   UNPACKDIR ??= "${WORKDIR}"
> which allows the recipes to work also with older Yocto releases
> without overriding the default value used in styhead.
> 
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
>  meta/conf/bitbake.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I'm getting a bit frustrated with the requests to make changes to core
to make it easier for people to write layers which "work" with all
versions of the project. That isn't something we've ever committed to
or encourage, quite the opposite.

There isn't any analysis of what other side effects this may have, or
whether it is actually the right decision for the variable going
forward, the change is entirely retrospective looking and I'm not keen
to evaluate changes that way.

Cheers,

Richard
Peter Kjellerstedt May 31, 2024, 12:15 p.m. UTC | #2
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 31 maj 2024 12:57
> To: samuli.piippo@gmail.com; openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] base/bitbake.conf: use default assigment for UNPACKDIR
> 
> On Fri, 2024-05-31 at 10:27 +0000, Samuli Piippo via lists.openembedded.org wrote:
> > This lets recipes in other layers add weak default assignment as
> >   UNPACKDIR ??= "${WORKDIR}"
> > which allows the recipes to work also with older Yocto releases
> > without overriding the default value used in styhead.
> >
> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> > ---
> >  meta/conf/bitbake.conf | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I'm getting a bit frustrated with the requests to make changes to core
> to make it easier for people to write layers which "work" with all
> versions of the project. That isn't something we've ever committed to
> or encourage, quite the opposite.
> 
> There isn't any analysis of what other side effects this may have, or
> whether it is actually the right decision for the variable going
> forward, the change is entirely retrospective looking and I'm not keen
> to evaluate changes that way.

Actually, is there any reason it is using "??=" rather than "="? Other 
similar variables such as WORKDIR, S, B, etc all use = when setting 
them in bitbake.conf.

> Cheers,
> 
> Richard

//Peter
Richard Purdie May 31, 2024, 12:19 p.m. UTC | #3
On Fri, 2024-05-31 at 12:15 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From:
> > openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org
> > > On Behalf Of Richard Purdie
> > Sent: den 31 maj 2024 12:57
> > To: samuli.piippo@gmail.com;
> > openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH] base/bitbake.conf: use default
> > assigment for UNPACKDIR
> > 
> > On Fri, 2024-05-31 at 10:27 +0000, Samuli Piippo via
> > lists.openembedded.org wrote:
> > > This lets recipes in other layers add weak default assignment as
> > >   UNPACKDIR ??= "${WORKDIR}"
> > > which allows the recipes to work also with older Yocto releases
> > > without overriding the default value used in styhead.
> > > 
> > > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> > > ---
> > >  meta/conf/bitbake.conf | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > I'm getting a bit frustrated with the requests to make changes to
> > core
> > to make it easier for people to write layers which "work" with all
> > versions of the project. That isn't something we've ever committed
> > to
> > or encourage, quite the opposite.
> > 
> > There isn't any analysis of what other side effects this may have,
> > or
> > whether it is actually the right decision for the variable going
> > forward, the change is entirely retrospective looking and I'm not
> > keen
> > to evaluate changes that way.
> 
> Actually, is there any reason it is using "??=" rather than "="?
> Other 
> similar variables such as WORKDIR, S, B, etc all use = when setting 
> them in bitbake.conf.

Conceptually, it seemed to make sense to have a weak default value
which any other setting would override if set by other levels of the
system.

Other variables in that file were defined before ??= existed.

Cheers,

Richard
Alexander Kanavin May 31, 2024, 12:41 p.m. UTC | #4
On Fri, 31 May 2024 at 12:56, Richard Purdie via
lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
> > This lets recipes in other layers add weak default assignment as
> >   UNPACKDIR ??= "${WORKDIR}"
> > which allows the recipes to work also with older Yocto releases
> > without overriding the default value used in styhead.
> >
> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> > ---
> >  meta/conf/bitbake.conf | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I'm getting a bit frustrated with the requests to make changes to core
> to make it easier for people to write layers which "work" with all
> versions of the project. That isn't something we've ever committed to
> or encourage, quite the opposite.

This is obviously driven by meta-qt6 and its 'special' branching
strategy (a branch per qt release rather than per yocto relase as is
standard practice in almost any other layer):
https://code.qt.io/cgit/yocto/meta-qt6.git/about/

I've wanted to tell this directly to Qt people for a while, and now is
the chance: fix your branches to follow yocto releases. And provide
multiple qt versions in all of them, selectable via PREFERRED_VERSION.

Alex
diff mbox series

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 3ef2deb088..386e6e0a3e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -405,7 +405,7 @@  STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${PV}"
 STAMPCLEAN = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/*-*"
 BASE_WORKDIR ?= "${TMPDIR}/work"
 WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${PV}"
-UNPACKDIR ??= "${WORKDIR}/sources-unpack"
+UNPACKDIR ?= "${WORKDIR}/sources-unpack"
 T = "${WORKDIR}/temp"
 D = "${WORKDIR}/image"
 S = "${WORKDIR}/${BP}"