public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH 1/3] fix(isar-sstate): catch errors in signature comparison
Date: Tue, 19 Jul 2022 09:05:27 +0200	[thread overview]
Message-ID: <20220719090527.0979e298@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20220719061628.192078-2-adriaan.schmidt@siemens.com>

Am Tue, 19 Jul 2022 08:16:26 +0200
schrieb Adriaan Schmidt <adriaan.schmidt@siemens.com>:

> Those errors happen when the sstate cache contains both pre and post
> bitbake-2.0 signatures, which have a different format (pickle vs.
> compressed json).
> 
> Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> ---
>  scripts/isar-sstate | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/isar-sstate b/scripts/isar-sstate
> index 8ea85edc..9f5c17b0 100755
> --- a/scripts/isar-sstate
> +++ b/scripts/isar-sstate
> @@ -781,7 +781,10 @@ def sstate_analyze(source, target, **kwargs):
>  
>              local_file = source.download(s.path)
>              remote_file = target.download(t.path)
> -            out = compare_sigfiles(remote_file, local_file,
> recursecb, color=True)
> +            try:
> +                out = compare_sigfiles(remote_file, local_file,
> recursecb, color=True)
> +            except:
> +                out = ["Failed to compare signatures."]

Maybe there is a python exception for just that, or an error code from
which we can take strerr so we do not invent our own.

Henning

>              source.release(local_file)
>              target.release(remote_file)
>              # shorten hashes from 64 to 8 characters for better
> readability


  reply	other threads:[~2022-07-19  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19  6:16 [PATCH 0/3] isar-sstate improvements Adriaan Schmidt
2022-07-19  6:16 ` [PATCH 1/3] fix(isar-sstate): catch errors in signature comparison Adriaan Schmidt
2022-07-19  7:05   ` Henning Schild [this message]
2022-07-19  8:11     ` Schmidt, Adriaan
2022-07-19  6:16 ` [PATCH 2/3] isar-sstate: refactor exit codes and error messages Adriaan Schmidt
2022-07-19  6:16 ` [PATCH 3/3] docs(isar-sstate): update documentation of lint command Adriaan Schmidt

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=20220719090527.0979e298@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.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