From: Michael Tremer Date: Thu, 19 Oct 2023 10:41:50 +0000 (+0000) Subject: config: Create a temporary directory X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c7bb702f1dc783349441eaeb876abfdf8679a59;p=pbs.git config: Create a temporary directory As a non-privileged user, we cannot mount a ramdisk which is why we cannot use this and need to pre-create an empty directory. Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/config.py b/src/buildservice/config.py index 2edb0144..5ffab696 100644 --- a/src/buildservice/config.py +++ b/src/buildservice/config.py @@ -96,8 +96,9 @@ class PakfireConfig(base.Object): log.debug("Launching Pakfire with configuration:\n%s", f.getvalue()) # Launch a new Pakfire instance (in a separate thread) - return await asyncio.to_thread(pakfire.Pakfire, arch=self.arch, conf=f, - logger=self._log, offline=False) + async with self.backend.tempdir() as d: + return await asyncio.to_thread(pakfire.Pakfire, path=d, arch=self.arch, + conf=f, logger=self._log, offline=False) async def __aexit__(self, type, value, traceback): pass