From: Michael Tremer Date: Sun, 12 May 2019 13:01:35 +0000 (+0100) Subject: builder: Download transaction and run it X-Git-Tag: 0.9.28~1285^2~1035 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b21de24a9fb30c29a11d497b216609cc16f4e46d;p=pakfire.git builder: Download transaction and run it Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/builder.py b/src/pakfire/builder.py index 0abc40019..140519f67 100644 --- a/src/pakfire/builder.py +++ b/src/pakfire/builder.py @@ -35,6 +35,7 @@ from . import arch from . import base from . import cgroup from . import config +from . import downloaders from . import logger from . import packages from . import repository @@ -518,9 +519,21 @@ class BuilderContext(object): # Logging self.log.debug(_("Installing build requirements: %s") % ", ".join(packages)) - # Initialise Pakfire and install all required packages + # Initialise Pakfire with self.pakfire as p: - p.install(packages) + # Install all required packages + transaction = p.install(packages) + + # Dump transaction to log + t = transaction.dump() + self.log.info(t) + + # Download transaction + d = downloaders.TransactionDownloader(self.pakfire, transaction) + d.download() + + # Run the transaction + transaction.run() def build(self, package, private_network=True, shell=True): package = self._prepare_package(package)