From: Daan De Meyer Date: Thu, 14 Dec 2023 18:15:21 +0000 (+0100) Subject: zypper: Enable autorefresh with refresh delay of 48h X-Git-Tag: v20~63^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2179%2Fhead;p=thirdparty%2Fmkosi.git 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. --- 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 """ )