]> git.ipfire.org Git - pbs.git/commitdiff
builds: Drop old source import function
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Oct 2022 10:20:40 +0000 (10:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Oct 2022 10:20:40 +0000 (10:20 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/builds.py

index ed225462788eb3fff5ed5625766413491165eccd..60ab78f93be4775f8333ea6519fb6c445662c26f 100644 (file)
@@ -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