public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
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 16:20:20 +0100	[thread overview]
Message-ID: <D5X29O37SXPR.21UIYRGZFKD1W@bootlin.com> (raw)
In-Reply-To: <caceb002-6c62-4acd-87c3-41555e3344fc@cherry.de>

Hi Quentin,

On Wed Nov 27, 2024 at 3:08 PM CET, Quentin Schulz via lists.yoctoproject.org wrote:
[...]
>>>>> 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".
>> 
>
> It is useful! The point is to highlight the "version" in the filename of 
> the recipe is not the one you should use in PREFERRED_VERSION, but 
> rather the value of PV. Incidentally, PV = version in the filename by 
> default I believe (maybe for the git ones too?) but it is 
> recommended/required to set PV for git recipes. So in order to pick the 
> git recipe, you need to use the PV set inside the git recipe and not use 
> "git" along. I believe this is what the original author wanted this 
> example to transpire?

I didn't think of it that way, but yes, maybe the author wanted to transpire
this + the fact that in the hash wasn't predictable hence the "%". Or only one
or the other.

In any case, I get what you mean, and I'll update the description in a v3.

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2024-11-27 15:20 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       ` [docs] " Antonin Godard
2024-11-27 14:08         ` Quentin Schulz
2024-11-27 15:20           ` Antonin Godard [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=D5X29O37SXPR.21UIYRGZFKD1W@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