jw.pkg.cmds.distro.CmdDup: Support --donwload-only

Add --download-only to the options of jw-pkg.py distro dup, which
makes the command only download packages from the repositories
without installing them.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-03 11:08:02 +01:00
commit 888ea9979a
5 changed files with 19 additions and 4 deletions

View file

@ -11,4 +11,8 @@ class Dup(Base):
super().__init__(parent)
async def run(self, args: Namespace):
raise NotImplementedError('distro dup is not yet implemented for Debian-like distributions')
apt_get_args: list[str] = []
if args.download_only:
apt_get_args.append('--download-only')
apt_get_args.append('upgrade')
return await self.apt_get(apt_get_args)