]> git.ipfire.org Git - pbs.git/commitdiff
config: Initialize Pakfire in stub mode
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 10:19:02 +0000 (10:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 10:19:02 +0000 (10:19 +0000)
This way, Pakfire does not need a path, won't initialize the database
and so on. It simply can be used to perform dependency solving which is
all we need here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/config.py

index eced838d805a137256e20bda44f43c51e01f03bf..7c9875185c50d578e6437ce8cce5cfbae41b1d97 100644 (file)
@@ -78,14 +78,13 @@ class PakfireConfig(base.Object):
                        log.debug(config)
 
                # Launch a new Pakfire instance (in a separate thread)
-               async with self.backend.tempdir() as path:
-                       return await asyncio.to_thread(
-                               pakfire.Pakfire,
-                               ctx    = ctx,
-                               path   = path,
-                               arch   = self.arch,
-                               config = config,
-                       )
+               return await asyncio.to_thread(
+                       pakfire.Pakfire,
+                       stub   = True,
+                       ctx    = ctx,
+                       arch   = self.arch,
+                       config = config,
+               )
 
        async def __aexit__(self, type, value, traceback):
                pass