]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Drop internal builder
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2021 15:06:29 +0000 (15:06 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2021 15:06:29 +0000 (15:06 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/pakfire/builder.py
src/pakfire/cli.py
src/scripts/pakfire

index 5797ff76ff6bcc607b185e08263fcc140b07255e..b2ecd1d1d8e43ac09a1f81602f3cc27090f14b00 100644 (file)
@@ -110,10 +110,6 @@ install-exec-local:
                $(LN_S) -vf pakfire pakfire-daemon && \
                $(LN_S) -vf pakfire pakfire-key
 
-       $(MKDIR_P) $(DESTDIR)/$(scriptsdir)
-       cd $(DESTDIR)/$(scriptsdir) && \
-               $(LN_S) -vf ../../bin/pakfire builder
-
 # ------------------------------------------------------------------------------
 
 pakfire_PYTHON = \
index 1657222037957f891da9e2016ce08ae18f94fe8e..2f3e41ed97163dfb1c406bf8a51655a21df94b09 100644 (file)
@@ -462,10 +462,6 @@ class BuilderContext(object):
 
                        # Sanitize language.
                        "LANG" : os.environ.setdefault("LANG", "en_US.UTF-8"),
-
-                       # Set the container that we can detect, if we are inside a
-                       # chroot.
-                       "container" : "pakfire-builder",
                })
 
                # Inherit environment from distro
index 44a1b5a1cfbe47bfe4658967b287e7e06fc01a72..ba52fed4e7c937769b2fd1cde45490793faa416f 100644 (file)
@@ -391,14 +391,6 @@ class Cli(object):
 
 
 class CliBuilder(Cli):
-       def __init__(self):
-               Cli.__init__(self)
-
-               # Check if we are already running in a pakfire container. In that
-               # case, we cannot start another pakfire-builder.
-               if os.environ.get("container", None) == "pakfire-builder":
-                       raise PakfireContainerError(_("You cannot run pakfire-builder in a pakfire chroot"))
-
        def parse_cli(self):
                parser = argparse.ArgumentParser(
                        description = _("Pakfire builder command line interface"),
@@ -530,71 +522,6 @@ class CliBuilder(Cli):
                Cli.handle_provides(self, int=True)
 
 
-class CliBuilderIntern(Cli):
-       def __init__(self):
-               self.parser = argparse.ArgumentParser(
-                       description = _("Pakfire builder command line interface."),
-               )
-               self._add_common_arguments(self.parser)
-
-               # Add sub-commands.
-               self.sub_commands = self.parser.add_subparsers()
-
-               self.parse_command_build()
-
-               # Finally parse all arguments from the command line and save them.
-               self.args = self.parser.parse_args()
-
-               self.action2func = {
-                       "build"       : self.handle_build,
-               }
-
-       def parse_command_build(self):
-               # Implement the "build" command.
-               sub_build = self.sub_commands.add_parser("build",
-                       help=_("Build one or more packages."))
-               sub_build.add_argument("package", nargs=1,
-                       help=_("Give name of at least one package to build."))
-               sub_build.add_argument("action", action="store_const", const="build")
-
-               sub_build.add_argument("-a", "--arch",
-                       help=_("Build the package for the given architecture."))
-               sub_build.add_argument("--resultdir", nargs="?",
-                       help=_("Path were the output files should be copied to."))
-               sub_build.add_argument("-m", "--mode", nargs="?", default="development",
-                       help=_("Mode to run in. Is either 'release' or 'development' (default)."))
-               sub_build.add_argument("--nodeps", action="store_true",
-                       help=_("Do not verify build dependencies."))
-               sub_build.add_argument("--prepare", action="store_true",
-                       help=_("Only run the prepare stage."))
-
-       def handle_build(self):
-               # Get the package descriptor from the command line options
-               pkg = self.args.package[0]
-
-               # Check, if we got a regular file
-               if os.path.exists(pkg):
-                       pkg = os.path.abspath(pkg)
-               else:
-                       raise FileNotFoundError(pkg)
-
-               # Create pakfire instance.
-               c = config.ConfigBuilder()
-               p = base.Pakfire(arch = self.args.arch, config = c)
-
-               # Disable all repositories.
-               if self.args.nodeps:
-                       p.repos.disable_repo("*")
-
-               # Limit stages that are to be run.
-               if self.args.prepare:
-                       stages = ["prepare"]
-               else:
-                       stages = None
-
-               p.build(pkg, resultdir=self.args.resultdir, stages=stages)
-
-
 class CliClient(Cli):
        def __init__(self):
                # Create connection to pakfire hub
index e805f99127cac5954339ae4d9ab80ba29bb90fb4..dc1a51503e097c357e927d4552a44d5766b9e66f 100755 (executable)
@@ -51,7 +51,6 @@ basename2cls = {
        "pakfire-client"  : pakfire.cli.CliClient,
        "pakfire-daemon"  : pakfire.cli.CliDaemon,
        "pakfire-key"     : pakfire.cli.CliKey,
-       "builder"         : pakfire.cli.CliBuilderIntern,
 }
 
 # Get the basename of the program