It can be useful when rebuilding the image without adding or removing a
package.
---
imgcreate/yuminst.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/imgcreate/yuminst.py b/imgcreate/yuminst.py
index 9e54982..8aac85d 100644
--- a/imgcreate/yuminst.py
+++ b/imgcreate/yuminst.py
@@ -171,6 +171,10 @@ class LiveCDYum(yum.YumBase):
(res, resmsg) = self.buildTransaction()
except yum.Errors.RepoError, e:
raise CreatorError("Unable to download from repo : %s" %(e,))
+ # Empty transactions are generally fine, we might be rebuilding an
+ # existing image with no packages added
+ if resmsg.endswith(" - empty transaction"):
+ return res
if res != 2:
raise CreatorError("Failed to build transaction : %s" %
str.join("\n", resmsg))
--
1.7.3.2
Show replies by date