[elbe-devel] [PATCH 15/17] elbepack: projectmanager: drop unused function del_current_project_version
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 19 13:31:06 CEST 2024
This function is never used, so delete it.
Also propagate the deletion to other components which are now unused.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/projectmanager.py | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index b85fe000d5bd..6906865ded37 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -2,10 +2,8 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2014-2018 Linutronix GmbH
-import errno
import os
from os import path
-from shutil import rmtree
from threading import Lock
from elbepack.asyncworker import (
@@ -23,7 +21,7 @@ from elbepack.asyncworker import (
PdebuildJob,
UpdatePbuilderJob,
)
-from elbepack.db import ElbeDB, get_versioned_filename
+from elbepack.db import ElbeDB
from elbepack.elbexml import ValidationMode
from elbepack.log import read_loggingQ
from elbepack.uuid7 import uuid7
@@ -175,22 +173,6 @@ class ProjectManager:
# Make db reload the xml file
self.db.set_xml(ep.builddir, None)
- def del_current_project_version(self, userid, version):
- with self.lock:
- ep = self._get_current_project(userid, allow_busy=False)
-
- name = ep.xml.text('project/name')
- self.db.del_version(ep.builddir, version)
-
- # Delete corresponding package archive, if existing
- pkgarchive = get_versioned_filename(name, version, '.pkgarchive')
- pkgarchive_path = path.join(ep.builddir, pkgarchive)
- try:
- rmtree(pkgarchive_path)
- except OSError as e:
- if e.errno != errno.ENOENT:
- raise
-
def build_current_project(
self,
userid,
--
2.45.2
More information about the elbe-devel
mailing list