summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-05-31 17:36:47 -0400
committerJoey Hess <joey@kitenet.net>2011-05-31 17:36:47 -0400
commit394add719939dbb88386238247fd22245c9e61f8 (patch)
tree9eb0786478af443efb81c94fa5a824a658e85f63
parent50125a46225d2874da9f48ccb2d032b17e46756a (diff)
Fix error propigation to yum, which makes AVOID_COMMIT_BEFORE_INSTALL work. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=709487 Thanks, Thomas Moschny
-rw-r--r--debian/changelog8
-rw-r--r--yum-etckeeper.py6
2 files changed, 12 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index f195c9e..77bd3e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+etckeeper (0.55) UNRELEASED; urgency=low
+
+ * Fix error propigation to yum, which makes AVOID_COMMIT_BEFORE_INSTALL work.
+ Closes: https://bugzilla.redhat.com/show_bug.cgi?id=709487
+ Thanks, Thomas Moschny
+
+ -- Joey Hess <joeyh@debian.org> Tue, 31 May 2011 17:34:54 -0400
+
etckeeper (0.54) unstable; urgency=low
* Ignore inssev's FHS violating /etc/init.d/.depend.* files.
diff --git a/yum-etckeeper.py b/yum-etckeeper.py
index bdf9773..be3c943 100644
--- a/yum-etckeeper.py
+++ b/yum-etckeeper.py
@@ -18,7 +18,7 @@ import os
from glob import fnmatch
import yum
-from yum.plugins import TYPE_CORE
+from yum.plugins import PluginYumExit, TYPE_CORE
requires_api_version = '2.1'
plugin_type = (TYPE_CORE,)
@@ -27,7 +27,9 @@ def pretrans_hook(conduit):
conduit.info(2, 'etckeeper: pre transaction commit')
servicecmd = conduit.confString('main', 'servicecmd', '/usr/bin/etckeeper')
command = '%s %s' % (servicecmd, " pre-install")
- os.system(command)
+ ret = os.system(command)
+ if ret != 0:
+ raise PluginYumExit('etckeeper returned %d' % (ret >> 8))
def posttrans_hook(conduit):
conduit.info(2, 'etckeeper: post transaction commit')