python emit_pkgdata() {
from glob import glob
import json
- import bb.compress.zstd
+ import gzip
def process_postinst_on_target(pkg, mlprefix):
pkgval = d.getVar('PKG_%s' % pkg)
sf.write('%s_%s: %d\n' % ('PKGSIZE', pkg, total_size))
- subdata_extended_file = pkgdatadir + "/extended/%s.json.zstd" % pkg
- num_threads = int(d.getVar("BB_NUMBER_THREADS"))
- with bb.compress.zstd.open(subdata_extended_file, "wt", encoding="utf-8", num_threads=num_threads) as f:
+ subdata_extended_file = pkgdatadir + "/extended/%s.json.gz" % pkg
+ with gzip.open(subdata_extended_file, "wt", encoding="utf-8") as f:
json.dump(extended_data, f, sort_keys=True, separators=(",", ":"))
# Symlinks needed for rprovides lookup
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