Let's make sure we use the default metadata expiration checks unless
-ff was specified. Apt doesn't support anything like this so we don't
change anything there.
context,
"makecache",
arguments=[
- "--refresh",
+ *(["--refresh"] if context.args.force > 1 else []),
*(["--setopt=cacheonly=none"] if cls.executable(context.config) == "dnf5" else []),
*options,
],
@classmethod
def sync(cls, context: Context) -> None:
- cls.invoke(context, "--sync", ["--refresh"])
+ cls.invoke(context, "--sync", ["--refresh"] + (["--refresh"] if context.args.force > 1 else []))
@classmethod
def createrepo(cls, context: Context) -> None:
@classmethod
def sync(cls, context: Context) -> None:
- cls.invoke(context, "refresh")
+ cls.invoke(context, "refresh", ["--force"] if context.args.force > 1 else [])
@classmethod
def createrepo(cls, context: Context) -> None: