]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
dnf: when runnning with --network=never, use package metadata cache 776/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 4 Aug 2021 10:40:51 +0000 (12:40 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Aug 2021 08:07:31 +0000 (10:07 +0200)
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.

mkosi/__init__.py

index 93908da012c517451e0cdd5e8f9d90cebadcacc0..89cb5393b28d9d915b5efbde0447933b2238d965 100644 (file)
@@ -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}"]