Message ID | 20241217-release-note-5-2-updates-v1-13-b189493b1b09@bootlin.com |
---|---|
State | New |
Headers | show |
Series | Updates from recent core changes | expand |
Hi Antonin, On 12/17/24 10:27 AM, Antonin Godard via lists.yoctoproject.org wrote: > This variable is similar to the PREFERRED_PROVIDER variable but it > denotes a runtime provider specifically. > > Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> > --- > documentation/ref-manual/variables.rst | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst > index 50cd8948b35f381414837acc9b9e925dc5110779..e0b87c0e5ff8cf7bd2598cbbb184f9aada19d326 100644 > --- a/documentation/ref-manual/variables.rst > +++ b/documentation/ref-manual/variables.rst > @@ -6711,6 +6711,25 @@ system and gives an overview of their function and contents. > :term:`PREFERRED_PROVIDERS` > See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. > > + :term:`PREFERRED_RPROVIDER` > + The :term:`PREFERRED_RPROVIDER` variable works like the > + :term:`PREFERRED_PROVIDER` variable, but it denotes recipes that provide a > + *runtime* component. Runtime providers are declared by recipes that set > + the :term:`RPROVIDES` variable. For example:: > + > + PREFERRED_RPROVIDER_virtual-x-terminal-emulator = "rxvt-unicode" Missing a whitespace for the alignment I believe (I believe we're three-whitespace aligned usually?). Ditto for the other code blocks below. > + > + This statement sets the runtime provider for the X terminal emulator to > + ``rxvt-unicode``. The ``rxvt-unicode`` recipe is a runtime provider of > + this component because it contains the following :term:`RPROVIDES` > + definition:: > + > + RPROVIDES:${PN} = "virtual-x-terminal-emulator" > + We have to be very careful with the word recipe here. Above, it's the ``rxvt-unicode`` package that is a runtime provider of virtual-x-terminal-emulator, because of the :${PN} override. I assume PREFERRED_RPROVIDER_virtual-x-terminal-emulator should also contain the name of the package and not the recipe? That I am not entirely sure of though, haven't looked into the implementation of it. Cheers, Quentin
Hi Quentin, On Tue Dec 17, 2024 at 3:43 PM CET, Quentin Schulz wrote: > Hi Antonin, > > On 12/17/24 10:27 AM, Antonin Godard via lists.yoctoproject.org wrote: >> This variable is similar to the PREFERRED_PROVIDER variable but it >> denotes a runtime provider specifically. >> >> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> >> --- >> documentation/ref-manual/variables.rst | 19 +++++++++++++++++++ >> 1 file changed, 19 insertions(+) >> >> diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst >> index 50cd8948b35f381414837acc9b9e925dc5110779..e0b87c0e5ff8cf7bd2598cbbb184f9aada19d326 100644 >> --- a/documentation/ref-manual/variables.rst >> +++ b/documentation/ref-manual/variables.rst >> @@ -6711,6 +6711,25 @@ system and gives an overview of their function and contents. >> :term:`PREFERRED_PROVIDERS` >> See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. >> >> + :term:`PREFERRED_RPROVIDER` >> + The :term:`PREFERRED_RPROVIDER` variable works like the >> + :term:`PREFERRED_PROVIDER` variable, but it denotes recipes that provide a >> + *runtime* component. Runtime providers are declared by recipes that set >> + the :term:`RPROVIDES` variable. For example:: >> + >> + PREFERRED_RPROVIDER_virtual-x-terminal-emulator = "rxvt-unicode" > > Missing a whitespace for the alignment I believe (I believe we're > three-whitespace aligned usually?). Ditto for the other code blocks below. > >> + >> + This statement sets the runtime provider for the X terminal emulator to >> + ``rxvt-unicode``. The ``rxvt-unicode`` recipe is a runtime provider of >> + this component because it contains the following :term:`RPROVIDES` >> + definition:: >> + >> + RPROVIDES:${PN} = "virtual-x-terminal-emulator" >> + > > We have to be very careful with the word recipe here. Above, it's the > ``rxvt-unicode`` package that is a runtime provider of > virtual-x-terminal-emulator, because of the :${PN} override. > > I assume PREFERRED_RPROVIDER_virtual-x-terminal-emulator should also > contain the name of the package and not the recipe? That I am not > entirely sure of though, haven't looked into the implementation of it. Well... the doc for PREFERRED_PROVIDER _and_ the code refers to these as neither "packages" or "recipes", but "items". See the doc for PREFERRED_PROVIDER and https://git.openembedded.org/bitbake/tree/lib/bb/providers.py#n323. But as you said, the :${PN} override implies that a _package_ RPROVIDES something, so we understand it the same way. I will be more precise about this in the v2. Antonin
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 50cd8948b35f381414837acc9b9e925dc5110779..e0b87c0e5ff8cf7bd2598cbbb184f9aada19d326 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -6711,6 +6711,25 @@ system and gives an overview of their function and contents. :term:`PREFERRED_PROVIDERS` See :term:`bitbake:PREFERRED_PROVIDERS` in the BitBake manual. + :term:`PREFERRED_RPROVIDER` + The :term:`PREFERRED_RPROVIDER` variable works like the + :term:`PREFERRED_PROVIDER` variable, but it denotes recipes that provide a + *runtime* component. Runtime providers are declared by recipes that set + the :term:`RPROVIDES` variable. For example:: + + PREFERRED_RPROVIDER_virtual-x-terminal-emulator = "rxvt-unicode" + + This statement sets the runtime provider for the X terminal emulator to + ``rxvt-unicode``. The ``rxvt-unicode`` recipe is a runtime provider of + this component because it contains the following :term:`RPROVIDES` + definition:: + + RPROVIDES:${PN} = "virtual-x-terminal-emulator" + + For more information on virtual providers, see the + ":ref:`dev-manual/new-recipe:using virtual providers`" section in the + Yocto Project Development Tasks Manual. + :term:`PREFERRED_VERSION` If there are multiple versions of a recipe available, this variable determines which version should be given preference. You must always
This variable is similar to the PREFERRED_PROVIDER variable but it denotes a runtime provider specifically. Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- documentation/ref-manual/variables.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)