# If the build was successful, cleanup all temporary files.
b.cleanup()
+ def dist(self, pkg, resultdir):
+ pkg = packages.Makefile(self, pkg)
+
+ return pkg.dist(resultdir=resultdir)
class PakfireBuilder(Pakfire):
return c
- def dist(self, pkg, resultdir):
- pkg = packages.Makefile(self, pkg)
-
- return pkg.dist(resultdir=resultdir)
-
def build(self, pkg, resultdirs=None, shell=False, install_test=True, after_shell=False, **kwargs):
# As the BuildEnviron is only able to handle source packages, we must package makefiles.
if pkg.endswith(".%s" % MAKEFILE_EXTENSION):
b.stop()
+class PakfireClient(Pakfire):
+ mode = "client"
+
+
class PakfireServer(Pakfire):
mode = "server"
class CliClient(Cli):
+ pakfire = base.PakfireClient
+
def __init__(self):
self.parser = argparse.ArgumentParser(
description = _("Pakfire client command line interface."),
}
# Read configuration for the pakfire client.
- self.conf = conf = config.ConfigClient()
+ self.config = config.ConfigClient()
# Create connection to pakfire hub.
self.client = client.PakfireUserClient(
- conf.get("client", "server"),
- conf.get("client", "username"),
- conf.get("client", "password"),
+ self.config.get("client", "server"),
+ self.config.get("client", "username"),
+ self.config.get("client", "password"),
)
+ @property
+ def pakfire_args(self):
+ return {
+ "config" : self.config,
+ }
+
def parse_command_build(self):
# Parse "build" command.
sub_build = self.sub_commands.add_parser("build",
ret.append(" PAKFIRE %s" % PAKFIRE_VERSION)
ret.append("")
ret.append(" %-20s: %s" % (_("Hostname"), system.hostname))
- ret.append(" %-20s: %s" % (_("Pakfire hub"), self.conf.get("client", "server")))
- if self.conf.get("client", "username") and self.conf.get("client", "password"):
+ ret.append(" %-20s: %s" % (_("Pakfire hub"), self.config.get("client", "server")))
+ if self.config.get("client", "username") and self.config.get("client", "password"):
ret.append(" %-20s: %s" % \
- (_("Username"), self.conf.get("client", "username")))
+ (_("Username"), self.config.get("client", "username")))
ret.append("")
# Hardware information