From: Michael Tremer Date: Tue, 25 Oct 2022 10:20:40 +0000 (+0000) Subject: builds: Drop old source import function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0aa971d46978dc015d08c6f62b6a1bf98773b3;p=pbs.git builds: Drop old source import function Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/builds.py b/src/buildservice/builds.py index ed225462..60ab78f9 100644 --- a/src/buildservice/builds.py +++ b/src/buildservice/builds.py @@ -206,42 +206,6 @@ class Builds(base.Object): return build - async def create_from_source_package(self, filename, distro, commit=None, type="release", - arches=None, check_for_duplicates=True, owner=None): - assert distro - - # Open the package file to read some basic information. - pkg = pakfire.packages.open(None, None, filename) - - if check_for_duplicates: - if distro.has_package(pkg.name, pkg.epoch, pkg.version, pkg.release): - log.warning("Duplicate package detected: %s. Skipping." % pkg) - return - - # Open the package and add it to the database - pkg = await self.backend.packages.create(filename) - - # Associate the package to the processed commit - if commit: - pkg.commit = commit - - # Create a new build object from the package - build = self.create(pkg, type=type, owner=owner, distro=distro) - - if commit: - # Import any fixed bugs - for bug in commit.fixed_bugs: - build.add_bug(bug) - - # Upvote the build for the testers - for tester in commit.testers: - build.upvote(tester) - - # Create all automatic jobs - build.create_autojobs(arches=arches) - - return build - # Comments @lazy_property