# The version of the kernel this machine is running.
kernel_version = os.uname()[2]
- def __init__(self, filename=None, distro_name=None, configs=None, arch=None, build_id=None, logfile=None,
- builder_mode="release", use_cache=None, **pakfire_args):
+ def __init__(self, filename=None, distro_name=None, config=None, configs=None, arch=None,
+ build_id=None, logfile=None, builder_mode="release", use_cache=None, **pakfire_args):
# Set mode.
assert builder_mode in ("development", "release",)
self.mode = builder_mode
if pakfire_args.has_key("mode"):
del pakfire_args["mode"]
- config = ConfigBuilder(files=configs)
- if not configs:
- if distro_name is None:
- distro_name = config.get("builder", "distro", None)
+ if config is None:
+ config = ConfigBuilder(files=configs)
- config.load_distro_config(distro_name)
+ if not configs:
+ if distro_name is None:
+ distro_name = config.get("builder", "distro", None)
+ config.load_distro_config(distro_name)
if not config.has_distro():
log.error(_("You have not set the distribution for which you want to build."))
if not self.build_source_hash512 == h.hexdigest():
raise DownloadError, "Hash check did not succeed."
- # Write configuration to file.
- f = open(cfgfile, "w")
- f.write(self.build_config)
- print self.build_config
- f.close()
+ # Build configuration.
+ config = pakfire.config.Config(files=["general.conf"])
+
+ # Parse the configuration received from the build service.
+ config.parse(self.build_config)
# Create dict with arguments that are passed to the pakfire
# builder.
kwargs = {
+ "config" : config,
+
# Of course this is a release build.
# i.e. don't use local packages.
"builder_mode" : "release",
# Files and directories (should be self explaining).
"logfile" : logfile,
- # Configuration files to load.
- "configs" : [
- os.path.join(CONFIG_DIR, "general.conf"),
- cfgfile,
- ],
-
# Perform the build for this architecture.
"arch" : self.build_arch,
}