[elbe-devel] [PATCH 12/22] elbepack: projectmanager: avoid cache indirection in build_chroot_tarball()

Thomas Weißschuh thomas.weissschuh at linutronix.de
Wed Aug 14 15:29:26 CEST 2024


The target project is already available, there is no need for the
indirection refetching it from the cache.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/daemons/soap/esoap.py | 3 +--
 elbepack/projectmanager.py     | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index 5bb6ebf937a4..a3513b1bfc78 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -175,8 +175,7 @@ class ESoap (ServiceBase):
     @rpc(String)
     @authenticated_uid
     def build_chroot_tarball(self, uid, builddir):
-        self.app.pm.open_project(uid, builddir)
-        self.app.pm.build_chroot_tarball(uid)
+        self.app.pm.build_chroot_tarball(uid, builddir)
 
     @rpc(String)
     @authenticated_uid
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 631d2b01dd5e..d27d5939fe85 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -233,9 +233,9 @@ class ProjectManager:
 
             return ep.orig_fname
 
-    def build_chroot_tarball(self, userid):
+    def build_chroot_tarball(self, userid, builddir):
+        ep = self.open_project(userid, builddir, allow_busy=False)
         with self.lock:
-            ep = self._get_current_project(userid, allow_busy=False)
             self.worker.enqueue(BuildChrootTarJob(ep))
 
     def build_sysroot(self, userid):

-- 
2.46.0



More information about the elbe-devel mailing list