diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-11-29 15:44:10 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-11-29 15:44:43 -0500 |
commit | 2614b33bd9de1f4ceae1422013b818f1842d0736 (patch) | |
tree | 2c72e25b4ae0a5c43c6a82312dcb967cc75908ef /src/lib/Client/Tools/YUMng.py | |
parent | 19c3aceac953491ecacb9b44e743412c99eb7968 (diff) | |
download | bcfg2-2614b33bd9de1f4ceae1422013b818f1842d0736.tar.gz bcfg2-2614b33bd9de1f4ceae1422013b818f1842d0736.tar.bz2 bcfg2-2614b33bd9de1f4ceae1422013b818f1842d0736.zip |
improved error/debugging messages from YUMng
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py index 04174b3a1..bd8b7c653 100644 --- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -841,33 +841,38 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): for inst in install_pkgs: pkg_arg = self.instance_status[inst].get('pkg').get('name') + self.logger.debug("Installing %s" % pkg_arg) try: self.yb.install(**build_yname(pkg_arg, inst)) except yum.Errors.YumBaseError: yume = sys.exc_info()[1] - self.logger.error("Error installing some packages: %s" % yume) + self.logger.error("Error installing package %s: %s" % + (pkg_arg, yume)) if len(upgrade_pkgs) > 0: self.logger.info("Attempting to upgrade packages") for inst in upgrade_pkgs: pkg_arg = self.instance_status[inst].get('pkg').get('name') + self.logger.debug("Upgrading %s" % pkg_arg) try: self.yb.update(**build_yname(pkg_arg, inst)) except yum.Errors.YumBaseError: yume = sys.exc_info()[1] - self.logger.error("Error upgrading some packages: %s" % yume) + self.logger.error("Error upgrading package %s: %s" % + (pkg_arg, yume)) if len(reinstall_pkgs) > 0: self.logger.info("Attempting to reinstall packages") for inst in reinstall_pkgs: pkg_arg = self.instance_status[inst].get('pkg').get('name') + self.logger.debug("Reinstalling %s" % pkg_arg) try: self.yb.reinstall(**build_yname(pkg_arg, inst)) except yum.Errors.YumBaseError: yume = sys.exc_info()[1] - self.logger.error("Error upgrading some packages: %s" \ - % yume) + self.logger.error("Error reinstalling package %s: %s" % + (pkg_arg, yume)) self._runYumTransaction() |