Print & log messages on scriptlet/transaction errors
We should probably let the user know if something goes wrong with the transaction or if a scriptlet fails. So: log the messages so we can find (and, one hopes, fix) them later.
This commit is contained in:
parent
3a1e176cbb
commit
26c77b4fba
@ -115,3 +115,10 @@ class LoraxRpmCallback(yum.rpmtrans.RPMBaseCallback):
|
|||||||
def filelog(self, package, action):
|
def filelog(self, package, action):
|
||||||
if self.fileaction.get(action) == "Installed":
|
if self.fileaction.get(action) == "Installed":
|
||||||
logger.debug("{0} installed successfully".format(package))
|
logger.debug("{0} installed successfully".format(package))
|
||||||
|
|
||||||
|
def errorlog(self, msg):
|
||||||
|
logger.warning("RPM transaction error: %s", msg)
|
||||||
|
|
||||||
|
def scriptout(self, package, msgs):
|
||||||
|
if msgs:
|
||||||
|
logger.info("%s scriptlet output:\n%s", package, msgs)
|
||||||
|
Loading…
Reference in New Issue
Block a user