diff --git a/python/online/fxreader/pr34/commands_typed/archlinux/cli/compile.py b/python/online/fxreader/pr34/commands_typed/archlinux/cli/compile.py index 2f3851b..96c9a5a 100644 --- a/python/online/fxreader/pr34/commands_typed/archlinux/cli/compile.py +++ b/python/online/fxreader/pr34/commands_typed/archlinux/cli/compile.py @@ -167,6 +167,7 @@ def main(args: list[str]) -> int: repo=pkg.repo, url=url, sha256=pkg.sha256sum if compile_options.generate_hashes else '', + csize=pkg.csize, pinned=is_pinned, depends=pkg.depends, ) diff --git a/python/online/fxreader/pr34/commands_typed/archlinux/models.py b/python/online/fxreader/pr34/commands_typed/archlinux/models.py index 27a1c26..5cc799f 100644 --- a/python/online/fxreader/pr34/commands_typed/archlinux/models.py +++ b/python/online/fxreader/pr34/commands_typed/archlinux/models.py @@ -176,6 +176,7 @@ class package_t: filename: str = '' repo: str = '' sha256sum: str = '' + csize: int = 0 depends: list[package_constraint_t] = dataclasses.field(default_factory=list) provides: list[package_constraint_t] = dataclasses.field(default_factory=list) conflicts: list[package_constraint_t] = dataclasses.field(default_factory=list) @@ -242,6 +243,7 @@ class compile_entry_t: repo: str url: str sha256: str = '' + csize: int = 0 pinned: bool = False depends: list[package_constraint_t] = dataclasses.field( default_factory=list @@ -262,6 +264,8 @@ class compile_result_t: line = '%s==%s' % (e.name, e.version) if e.sha256: line += ' --hash=sha256:%s' % e.sha256 + if e.csize > 0: + line += ' --size=%d' % e.csize if e.pinned: line += ' # pinned' comment = '# %s' % e.url if e.url else '# %s/%s' % (e.repo, e.filename)