From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Steve Sakoman <steve@sakoman.com>
Cc: Tobias Hagelborn <Tobias.Hagelborn@axis.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCHv3] sstate.bbclass: Fetch non-existing local .sig files if needed
Date: Thu, 2 Feb 2023 12:49:06 +0000 [thread overview]
Message-ID: <6ebc02b87f424808b171e7506b2dee33@axis.com> (raw)
In-Reply-To: <20230130142025.3899801-1-tobiasha@axis.com>
Please backport this to Kirkstone and Langdale.
//Peter
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Tobias Hagelborn
> Sent: den 30 januari 2023 15:20
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCHv3] sstate.bbclass: Fetch non-existing local .sig files if needed
>
> For the case of a global shared state cache and a local sstate cache
> with a mix of signed and un-signed entries, there is a case where
> a .sig is missing locally, but may exist in the global sstate cache.
>
> For this case, do not just fail sstate fetch, but rather backfill
> the .sig file from the global sstate cache.
>
> If this case is detected, re-run the fetch operation to get the
> global .sig file (if it exists).
>
> Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com>
> ---
> New in v3:
> * Use exists
> * Consolidate into previously existing fetch block (with new condition)
>
> meta/classes-global/sstate.bbclass | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
> index 77e3ea34e1..567de4aba4 100644
> --- a/meta/classes-global/sstate.bbclass
> +++ b/meta/classes-global/sstate.bbclass
> @@ -365,8 +365,9 @@ def sstate_installpkg(ss, d):
> d.setVar("SSTATE_CURRTASK", ss['task'])
> sstatefetch = d.getVar('SSTATE_PKGNAME')
> sstatepkg = d.getVar('SSTATE_PKG')
> + verify_sig = bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False)
>
> - if not os.path.exists(sstatepkg):
> + if not os.path.exists(sstatepkg) or (verify_sig and not os.path.exists(sstatepkg + '.sig')):
> pstaging_fetch(sstatefetch, d)
>
> if not os.path.isfile(sstatepkg):
> @@ -377,7 +378,7 @@ def sstate_installpkg(ss, d):
>
> d.setVar('SSTATE_INSTDIR', sstateinst)
>
> - if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False):
> + if verify_sig:
> if not os.path.isfile(sstatepkg + '.sig'):
> bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg)
> return False
> --
> 2.30.2
prev parent reply other threads:[~2023-02-02 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 14:20 [PATCHv3] sstate.bbclass: Fetch non-existing local .sig files if needed Tobias Hagelborn
2023-02-02 12:49 ` Peter Kjellerstedt [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=6ebc02b87f424808b171e7506b2dee33@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=Tobias.Hagelborn@axis.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=steve@sakoman.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 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.