All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Get bitbake build target in recipe
@ 2024-05-02 13:56 mattwood2000
  2024-05-02 14:24 ` [yocto] " Josef Holzmayr
  0 siblings, 1 reply; 3+ messages in thread
From: mattwood2000 @ 2024-05-02 13:56 UTC (permalink / raw
  To: Yocto-mailing-list

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Hi all,

I'm trying to set the SRCREV of a recipe based on the image name from the
bitbake command line.

I have tried getting the IMAGE_BASENAME in various tasks but they all
return None presumably because these tasks and anonymous python function
are evaluated at parse time?

Does anyone know if it is possible to get the name of the recipe or image
being passed to bitbake within a recipe?

Thanks, Matt.

[-- Attachment #2: Type: text/html, Size: 546 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] Get bitbake build target in recipe
  2024-05-02 13:56 Get bitbake build target in recipe mattwood2000
@ 2024-05-02 14:24 ` Josef Holzmayr
  2024-05-02 15:06   ` mattwood2000
  0 siblings, 1 reply; 3+ messages in thread
From: Josef Holzmayr @ 2024-05-02 14:24 UTC (permalink / raw
  To: yocto, mattwood2000

[-- Attachment #1: Type: text/plain, Size: 1396 bytes --]

Hi Matt,

That's just not possible. A recipe can not know which image is being built.
Reason: the packaged outputs from recipes are used for all images that
depend on them, so they need to be image agnostic. If you need to trigger
something across various recipes, then use a DISTRO wide configuration
variable.

Greetz,
Josef

On Thu, May 2, 2024 at 3:56 PM Matt Wood via lists.yoctoproject.org
<mattwood2000=gmail.com@lists.yoctoproject.org> wrote:

> Hi all,
>
> I'm trying to set the SRCREV of a recipe based on the image name from the
> bitbake command line.
>
> I have tried getting the IMAGE_BASENAME in various tasks but they all
> return None presumably because these tasks and anonymous python function
> are evaluated at parse time?
>
> Does anyone know if it is possible to get the name of the recipe or image
> being passed to bitbake within a recipe?
>
> Thanks, Matt.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#63025):
> https://lists.yoctoproject.org/g/yocto/message/63025
> Mute This Topic: https://lists.yoctoproject.org/mt/105862978/4689568
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> jester@theyoctojester.info]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 2365 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] Get bitbake build target in recipe
  2024-05-02 14:24 ` [yocto] " Josef Holzmayr
@ 2024-05-02 15:06   ` mattwood2000
  0 siblings, 0 replies; 3+ messages in thread
From: mattwood2000 @ 2024-05-02 15:06 UTC (permalink / raw
  To: Josef Holzmayr; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

Hi Josef,

Ok thanks for the reply.  No problem I can manage it in another way.

Thanks, Matt

On Thu, May 2, 2024 at 10:25 AM Josef Holzmayr <jester@theyoctojester.info>
wrote:

> Hi Matt,
>
> That's just not possible. A recipe can not know which image is being
> built. Reason: the packaged outputs from recipes are used for all images
> that depend on them, so they need to be image agnostic. If you need to
> trigger something across various recipes, then use a DISTRO wide
> configuration variable.
>
> Greetz,
> Josef
>
> On Thu, May 2, 2024 at 3:56 PM Matt Wood via lists.yoctoproject.org
> <mattwood2000=gmail.com@lists.yoctoproject.org> wrote:
>
>> Hi all,
>>
>> I'm trying to set the SRCREV of a recipe based on the image name from the
>> bitbake command line.
>>
>> I have tried getting the IMAGE_BASENAME in various tasks but they all
>> return None presumably because these tasks and anonymous python function
>> are evaluated at parse time?
>>
>> Does anyone know if it is possible to get the name of the recipe or image
>> being passed to bitbake within a recipe?
>>
>> Thanks, Matt.
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> You automatically follow any topics you start or reply to.
>> View/Reply Online (#63025):
>> https://lists.yoctoproject.org/g/yocto/message/63025
>> Mute This Topic: https://lists.yoctoproject.org/mt/105862978/4689568
>> Group Owner: yocto+owner@lists.yoctoproject.org
>> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
>> jester@theyoctojester.info]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>>

[-- Attachment #2: Type: text/html, Size: 2886 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-02 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 13:56 Get bitbake build target in recipe mattwood2000
2024-05-02 14:24 ` [yocto] " Josef Holzmayr
2024-05-02 15:06   ` mattwood2000

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.