diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-05 11:38:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-01-05 11:59:08 +0000 |
commit | 859786a83f8bb826d3cd89c08bd9596fc7cf2474 (patch) | |
tree | d69e873b6fd4abe18fd559cf90221986869ae3ef /bitbake/lib/bb/siggen.py | |
parent | cc85c8eb9d96e91a7767e92c86f0d7f2960b093b (diff) | |
download | poky-859786a83f8bb826d3cd89c08bd9596fc7cf2474.tar.gz |
bitbake: siggen: Ensure version of siggen is verified
Since we need to change the form of the siggen function, we need to add versioning
and some verison checks. This means if a newer bitbake is used with older metadata
we can detect it.
(Bitbake rev: 721556568413508213d22c29985e305a45a8d68a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index b023b79eca..5a584cadf9 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -24,6 +24,16 @@ import hashserv.client | |||
24 | logger = logging.getLogger('BitBake.SigGen') | 24 | logger = logging.getLogger('BitBake.SigGen') |
25 | hashequiv_logger = logging.getLogger('BitBake.SigGen.HashEquiv') | 25 | hashequiv_logger = logging.getLogger('BitBake.SigGen.HashEquiv') |
26 | 26 | ||
27 | #find_siginfo and find_siginfo_version are set by the metadata siggen | ||
28 | # The minimum version of the find_siginfo function we need | ||
29 | find_siginfo_minversion = 2 | ||
30 | |||
31 | def check_siggen_version(siggen): | ||
32 | if not hasattr(siggen, "find_siginfo_version"): | ||
33 | bb.fatal("Siggen from metadata (OE-Core?) is too old, please update it (no version found)") | ||
34 | if siggen.find_siginfo_version < siggen.find_siginfo_minversion: | ||
35 | bb.fatal("Siggen from metadata (OE-Core?) is too old, please update it (%s vs %s)" % (siggen.find_siginfo_version, siggen.find_siginfo_minversion)) | ||
36 | |||
27 | class SetEncoder(json.JSONEncoder): | 37 | class SetEncoder(json.JSONEncoder): |
28 | def default(self, obj): | 38 | def default(self, obj): |
29 | if isinstance(obj, set) or isinstance(obj, frozenset): | 39 | if isinstance(obj, set) or isinstance(obj, frozenset): |