From 6bafad8210e3f1c8108b88b1dc9551c4b066760a Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 14 Dec 2023 19:15:21 +0100 Subject: [PATCH] zypper: Enable autorefresh with refresh delay of 48h Instead of never refreshing repository metadata, let's refresh every 48h, which is the same default that dnf uses. --- mkosi/installer/zypper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mkosi/installer/zypper.py b/mkosi/installer/zypper.py index 8d8797f3a..6197aab93 100644 --- a/mkosi/installer/zypper.py +++ b/mkosi/installer/zypper.py @@ -15,13 +15,15 @@ def setup_zypper(state: MkosiState, repos: Sequence[RpmRepository]) -> None: config.parent.mkdir(exist_ok=True, parents=True) # rpm.install.excludedocs can only be configured in zypp.conf so we append - # to any user provided config file. + # to any user provided config file. Let's also bump the refresh delay to + # the same default as dnf which is 48 hours. with config.open("a") as f: f.write( textwrap.dedent( f""" [main] rpm.install.excludedocs = {yes_no(not state.config.with_docs)} + repo.refresh.delay = {48 * 60} """ ) ) @@ -39,7 +41,7 @@ def setup_zypper(state: MkosiState, repos: Sequence[RpmRepository]) -> None: {repo.url} gpgcheck=1 enabled={int(repo.enabled)} - autorefresh=0 + autorefresh=1 keeppackages=1 """ ) -- 2.47.2