From: Zbigniew Jędrzejewski-Szmek Date: Wed, 4 Aug 2021 10:40:51 +0000 (+0200) Subject: dnf: when runnning with --network=never, use package metadata cache X-Git-Tag: v11~73^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F776%2Fhead;p=thirdparty%2Fmkosi.git dnf: when runnning with --network=never, use package metadata cache This implements the ability to rebuild packages from cache that was requested in #700. I don't think it can be said to resolve the issue, since this is only a partial solution, but useful nonetheless. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 93908da01..89cb5393b 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1789,6 +1789,9 @@ def invoke_dnf( "--setopt=install_weak_deps=0", ] + if args.with_network == "never": + cmdline += ["-C"] + if args.architecture is not None: cmdline += [f"--forcearch={args.architecture}"]