diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2023-03-27 15:05:30 -0500 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-03-27 16:29:20 -1000 |
commit | 1c7d555379c4b0962bccd018870989050d87675f (patch) | |
tree | 1c0fea645eedcdfe88654758fa74d3c15984e7dd /meta/lib | |
parent | 55b08fd641767a3d2e080727828ca37d9e610109 (diff) | |
download | openembedded-core-contrib-1c7d555379c4b0962bccd018870989050d87675f.tar.gz |
classes/package: Use gzip for extended package data
The master version of extended package data uses zstd for efficient
compression, but it relies on the zstd tool to be present on the host
system. Since dunfell supports older distros, we don't want to add this
tool as an additional requirement so switch to using gzip instead.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/packagedata.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/lib/oe/packagedata.py b/meta/lib/oe/packagedata.py index 00f7dc1f3d..feb834c0e3 100644 --- a/meta/lib/oe/packagedata.py +++ b/meta/lib/oe/packagedata.py @@ -59,12 +59,11 @@ def read_subpkgdata_dict(pkg, d): def read_subpkgdata_extended(pkg, d): import json - import bb.compress.zstd + import gzip - fn = d.expand("${PKGDATA_DIR}/extended/%s.json.zstd" % pkg) + fn = d.expand("${PKGDATA_DIR}/extended/%s.json.gz" % pkg) try: - num_threads = int(d.getVar("BB_NUMBER_THREADS")) - with bb.compress.zstd.open(fn, "rt", encoding="utf-8", num_threads=num_threads) as f: + with gzip.open(fn, "rt", encoding="utf-8") as f: return json.load(f) except FileNotFoundError: return None |