From cbe001638e76f6a3055d6afa9aaceaa882e99ed3 Mon Sep 17 00:00:00 2001 From: Martin Gracik Date: Mon, 4 Jun 2012 10:16:06 +0200 Subject: [PATCH] Verify the yum transaction Check if all packages that were supposed to be installed, ended up installed. --- src/pylorax/ltmpl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pylorax/ltmpl.py b/src/pylorax/ltmpl.py index 2560f27b..994b6012 100644 --- a/src/pylorax/ltmpl.py +++ b/src/pylorax/ltmpl.py @@ -428,6 +428,13 @@ class LoraxTemplateRunner(object): self.yum.repos.setProgressBar(LoraxDownloadCallback()) self.yum.processTransaction(callback=LoraxTransactionCallback(), rpmDisplay=LoraxRpmCallback()) + + # verify if all packages that were supposed to be installed, + # are really installed + errs = [t.po for t in self.yum.tsInfo if not self.yum.rpmdb.contains(po=t.po)] + for po in errs: + logger.error("package '%s' was not installed", po) + self.yum.closeRpmDB() def removefrom(self, pkg, *globs):