From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Stefan Herbrechtsmeier
<stefan.herbrechtsmeier-oss@weidmueller.com>,
openembedded-core@lists.openembedded.org
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Subject: Re: [OE-core] [RFC PATCH] bitbake.conf: Add base package version (BPV) variable
Date: Wed, 30 Mar 2022 12:51:26 +0100 [thread overview]
Message-ID: <d9889a46e5523848d3b770302623bc95e75c37d5.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220330081614.12772-1-stefan.herbrechtsmeier-oss@weidmueller.com>
On Wed, 2022-03-30 at 10:16 +0200, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> Add a base package version (BPV) variable and use it as default for the
> package version (PV) variable. The BPV variable contains the base
> package version of the recipe read from the recipe filename.
>
> The base package version variable supports an expansion of the version
> from the recipe filename without the need of an immediate variable
> expansion:
> PV = "${BPV}+git${SRCPV}"
>
> It allows the inclusion of include files inside a recipe file with the
> same version in the recipe and include filename even if the package
> version is different to the base package version in the filename:
> require linux-yocto-${BPV}.inc
>
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>
> ---
>
> meta/conf/bitbake.conf | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 7705415a4f..d56cf811ba 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -232,7 +232,8 @@ ASSUME_PROVIDED = "\
> ##################################################################
>
> PN = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
> -PV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
> +BPV = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
> +PV = "${BPV}"
> PR = "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
> PE = ""
> PF = "${PN}-${EXTENDPE}${PV}-${PR}"
I'm not really seeing a compelling use case for what is a fairly core change,
you've not really said why we need changes and what the big win is for users.
I'm also quite worried that this behaves quite differently to BPN. "base" in the
case of PN means strip off prefixes and suffixes yet here, BPV doesn't actually
strip anything off PV, you're just expected to set it differently yourself as
the user. The different usage semantics will likely confuse people and that
confusion isn't worth it IMO.
Cheers,
Richard
next prev parent reply other threads:[~2022-03-30 11:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 8:16 [RFC PATCH] bitbake.conf: Add base package version (BPV) variable Stefan Herbrechtsmeier
2022-03-30 8:41 ` [OE-core] " Alexander Kanavin
2022-03-30 8:41 ` Alexander Kanavin
2022-03-30 11:42 ` Stefan Herbrechtsmeier
2022-03-30 11:46 ` Alexander Kanavin
2022-03-30 11:51 ` Richard Purdie [this message]
2022-03-30 16:23 ` Stefan Herbrechtsmeier
2022-03-30 17:32 ` Khem Raj
2022-03-31 7:15 ` Stefan Herbrechtsmeier
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=d9889a46e5523848d3b770302623bc95e75c37d5.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=stefan.herbrechtsmeier-oss@weidmueller.com \
--cc=stefan.herbrechtsmeier@weidmueller.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox