DistroKit Mailinglist
 help / color / mirror / Atom feed
From: "Leonard Göhrs" <l.goehrs@pengutronix.de>
To: distrokit@pengutronix.de
Subject: Re: [DistroKit] [PATCH] targets: yocto: do not fail when optee-os is not found
Date: Fri, 15 Mar 2024 09:02:48 +0100	[thread overview]
Message-ID: <3ae8bb89-88d9-47a7-9c6c-aeafb57b829a@pengutronix.de> (raw)
In-Reply-To: <20240315073528.3566983-1-l.goehrs@pengutronix.de>

Hi,

sorry for the noise. This patch was meant for another mailing list,
but the git send-email --to distrokit@pengutronix.de command was the most
recent one in my shell history and I sent it here by accident.

On 15.03.24 08:35, Leonard Göhrs wrote:
> This fixes commit 7e16f18 ("targets: yocto: try finding and generating
> optee-os conf.mk"), which failed with a TargetError when optee-os is
> not found instead of just trying to find it.
> 
> Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
> ---
>   reason/targets/yocto.py | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/reason/targets/yocto.py b/reason/targets/yocto.py
> index 87220c8..0c21e49 100644
> --- a/reason/targets/yocto.py
> +++ b/reason/targets/yocto.py
> @@ -1,5 +1,6 @@
>   #!/usr/bin/python3
>   
> +import contextlib
>   from logging import LogRecord
>   import os
>   
> @@ -52,14 +53,14 @@ class YoctoTarget(Target):
>           except bb.providers.NoProvider:
>               raise TargetError("No busybox recipe found")
>   
> -        try:
> +        with contextlib.suppress(bb.providers.NoProvider):
> +            # tinfoil.parse_recipe() may raise bb.providers.NoProvider,
> +            # in this case we leave self.aliases[b'OPTEECONFIG'] unset.
>               rd = self.tinfoil.parse_recipe('optee-os')
>   
>               builddir = rd.getVar('B')
>               if builddir:
>                   self.aliases[b'OPTEECONFIG'] = os.path.join(builddir.encode(), b'conf.mk')
> -        except bb.providers.NoProvider:
> -            raise TargetError("No optee-os recipe found")
>   
>           # generate .config files if those do not exist, yet.
>           if b'KERNELCONFIG' in self.aliases and not os.path.exists(self.aliases[b'KERNELCONFIG']):
> 
> base-commit: a46729ec6ffd1c11fc94da2c6f3f4caba86581db



      reply	other threads:[~2024-03-15  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  7:35 Leonard Göhrs
2024-03-15  8:02 ` Leonard Göhrs [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=3ae8bb89-88d9-47a7-9c6c-aeafb57b829a@pengutronix.de \
    --to=l.goehrs@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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