import tempfile
from . import base
+from . import config
from . import misc
from .constants import *
"""
upload = None
+ # Collect the log from Pakfire
+ logger = config.PakfireLogger()
+
try:
# Create a new temporary directory and check out the requested revision
async with self.backend.tempdir() as path:
makefile = os.path.join(path, "%s/%s.nm" % (self.name, self.name))
# Launch a Pakfire instance with the repository configuration
- async with self.source.repo.pakfire() as p:
+ async with self.source.repo.pakfire(logger=logger) as p:
log.debug("Running dist for %s..." % makefile)
# Run dist() in a separate thread
# Store the error
self._set_attribute("error", "%s" % e)
- # Always delete the upload
+ # Always delete the upload & store the log
finally:
if upload:
await upload.delete()
+ # Store log
+ self._set_attribute("log", "%s" % logger)
+
class Git(object):
"""