From: "Antonin Godard" <antonin.godard@bootlin.com>
To: <quentin.schulz@cherry.de>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
<docs@lists.yoctoproject.org>
Subject: Re: [docs] [yocto-docs][PATCH v2] Update the documentation for SRCPV
Date: Wed, 27 Nov 2024 14:17:48 +0100 [thread overview]
Message-ID: <D5WZNUEBWRXT.18H1Q0G3SGRE6@bootlin.com> (raw)
In-Reply-To: <f6b6408f-e156-4b24-9930-0335b70f45be@cherry.de>
Hi Quentin,
On Wed Nov 27, 2024 at 1:51 PM CET, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Antonin,
>
> On 11/27/24 9:18 AM, Antonin Godard wrote:
>> Hi Quentin,
>>
>> On Mon Nov 25, 2024 at 4:57 PM CET, Quentin Schulz wrote:
>>> Hi Antonin,
>>>
>>> On 11/25/24 9:17 AM, Antonin Godard wrote:
>>>> The variable SRCPV is deprecated since 4.3. Instead of including SRCPV
>>>> in PV, including the sign "+" is enough for bitbake to add the source
>>>> control information to PKGV during the packaging phase.
>>>>
>>>> Update the documentation for SRCPV and the places where it was used.
>>>> When instructions previously referred to SRCPV, replace by mentioning to
>>>> include "+" in the assignment.
>>>>
>>>> In most examples, "+git" is added to PV as it is the most popular SCM.
>>>> Simply adding "+" is also possible, although it is better practice to
>>>> include the SCM name, so give that example.
>>>>
>>>> Update the gcompat example with l3afpad as it didn't include "+git" in
>>>> its PV definition anymore.
>>>>
>>>> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
>>>> ---
>>> [...]
>>>> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
>>>> index ec4d7ab73fe3ac1bc64f5378c65d19ae0b749809..f611edae9f37097734234805faa34b1850e5cfd1 100644
>>>> --- a/documentation/ref-manual/variables.rst
>>>> +++ b/documentation/ref-manual/variables.rst
>>>> @@ -209,12 +209,11 @@ system and gives an overview of their function and contents.
>>>> SRCREV = "${AUTOREV}"
>>>>
>>>> If you use the previous statement to retrieve the latest version of
>>>> - software, you need to be sure :term:`PV` contains
>>>> - ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel
>>>> - recipe that inherits the :ref:`ref-classes-kernel` class and you
>>>> - use the previous statement. In this example, ``${SRCPV}`` does not
>>>> - automatically get into :term:`PV`. Consequently, you need to change
>>>> - :term:`PV` in your recipe so that it does contain ``${SRCPV}``.
>>>> + software, you need to make sure :term:`PV` contains the ``+`` sign so
>>>> + :term:`bitbake` includes source control information to :term:`PKGV` when
>>>> + packaging the recipe. For example::
>>>> +
>>>> + PV = "6.10.y+git"
>>>>
>>>
>>> I believe this is not properly indented? Missing a space here to follow
>>> our standards?
>>
>>
>> Good catch, thank you. Some others below are also not properly indented. It
>> would be nice if sphinx-lint could report this, but I don't think it is able to.
>>
>
> It's open-source, so maybe something we can contribute :)
For sure. I took a glance at it, and there's no support for any config file at
all so that would be a first step to add, considering 2 or 3 spaces is a
personal choice.
[...]
>>> I think we could simplify the example. The point is not necessarily to
>>> use % with a git-named recipe but rather that a git-named recipe is not
>>> going to match "git" but the "PV" defined in the recipe. What do you think?
>>
>> Ok, something like:
>>
>> If your PV is equal to "a.b.c+git", you can match it with "a.b.c%" in
>> PREFERRED_VERSION?
>>
>> This makes more sense with the current state of things, and simplifies the
>> example a bit.
>>
>
> """
> If you want to select a recipe named foo_git.bb which has :term:`PV` set
> to `1.2.3+git`, you can do so by setting :term:`PREFERRED_VERSION_foo`
> to `1.2.3%` (i.e. using simply `git` will not work as the name of the
> recipe isn't used, but rather its :term:`PV`).
> """
>
> or something like that?
>
> Is PV really extended with the git hash when there's a + in there or is
> it only PKGV that gets it? Basically, do you even need % character when
> we have a + in PV now?
>
> Not sure it's clear, lemme know if I need to rephrase my question.
So yes you got it right: PV will never contain the hash, only PKGV will (and
only during do_install iirc, so bitbake-getvar PKGV will not show the hash).
Which makes me wonder if giving the example above is any useful, since you could
just set PREFERRED_VERSION_foo to "1.2.3+git".
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-11-27 13:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 8:17 [yocto-docs][PATCH v2] Update the documentation for SRCPV Antonin Godard
2024-11-25 15:57 ` Quentin Schulz
2024-11-27 8:18 ` Antonin Godard
2024-11-27 12:51 ` Quentin Schulz
2024-11-27 13:17 ` Antonin Godard [this message]
2024-11-27 14:08 ` [docs] " Quentin Schulz
2024-11-27 15:20 ` 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=D5WZNUEBWRXT.18H1Q0G3SGRE6@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=quentin.schulz@cherry.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox