diff options
Diffstat (limited to 'meta/lib/oe/packagedata.py')
-rw-r--r-- | meta/lib/oe/packagedata.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 0b17897e40..02c81e5a52 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py | |||
@@ -57,6 +57,18 @@ def read_subpkgdata_dict(pkg, d): | |||
57 | ret[newvar] = subd[var] | 57 | ret[newvar] = subd[var] |
58 | return ret | 58 | return ret |
59 | 59 | ||
60 | def read_subpkgdata_extended(pkg, d): | ||
61 | import json | ||
62 | import bb.compress.zstd | ||
63 | |||
64 | fn = d.expand("${PKGDATA_DIR}/extended/%s.json.zstd" % pkg) | ||
65 | try: | ||
66 | num_threads = int(d.getVar("BB_NUMBER_THREADS")) | ||
67 | with bb.compress.zstd.open(fn, "rt", encoding="utf-8", num_threads=num_threads) as f: | ||
68 | return json.load(f) | ||
69 | except FileNotFoundError: | ||
70 | return None | ||
71 | |||
60 | def _pkgmap(d): | 72 | def _pkgmap(d): |
61 | """Return a dictionary mapping package to recipe name.""" | 73 | """Return a dictionary mapping package to recipe name.""" |
62 | 74 | ||