From: Daan De Meyer Date: Tue, 3 Sep 2024 20:55:33 +0000 (+0200) Subject: base64 encode mirror if we put it in package cache dir key X-Git-Tag: v25~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dba01269de5ed574e70550dd7b943bbeef8d701b;p=thirdparty%2Fmkosi.git base64 encode mirror if we put it in package cache dir key Mirrors contain / characters. Paths can't contain / characters. Let's base64 encode the mirrors to avoid this issue. --- diff --git a/mkosi/config.py b/mkosi/config.py index 56e22c584..bf59e7c5d 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1600,7 +1600,7 @@ class Config: def package_cache_dir_or_default(self) -> Path: key = f"{self.distribution}~{self.release}~{self.architecture}" if self.mirror: - key += f"-{self.mirror}" + key += f"-{base64.b64encode(self.mirror.encode()).decode()}" return self.package_cache_dir or (INVOKING_USER.cache_dir() / key) def tools(self) -> Path: