summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2006-03-06 23:36:38 +0000
committerPaul Nasrat <pnasrat@redhat.com>2006-03-06 23:36:38 +0000
commit54ed7baaee7e1edbb05333c0f3bb348bd038bafe (patch)
tree4fbc4c31afa869d15c94c0fa4099b39a7d2d6a92 /yuminstall.py
parentd39a73a0c55806d696dffac2b92ccc6c238b6d5e (diff)
downloadanaconda-54ed7baaee7e1edbb05333c0f3bb348bd038bafe.tar.gz
anaconda-54ed7baaee7e1edbb05333c0f3bb348bd038bafe.tar.xz
anaconda-54ed7baaee7e1edbb05333c0f3bb348bd038bafe.zip
Better error handling
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/yuminstall.py b/yuminstall.py
index 0ba9519ee..2b7bec2d4 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -454,12 +454,28 @@ class AnacondaYum(YumSorter):
self.runTransaction(cb=cb)
except YumBaseError, probs:
# FIXME: we need to actually look at these problems...
- log.error("error running transaction: %s" %(probs,))
+ probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'),
+ rpm.RPMPROB_FILE_CONFLICT : _('file conflicts'),
+ rpm.RPMPROB_OLDPACKAGE: _('older package(s)'),
+ rpm.RPMPROB_DISKSPACE: _('insufficient disk space'),
+ rpm.RPMPROB_DISKNODES: _('insufficient disk inodes'),
+ rpm.RPMPROB_CONFLICT: _('package conflicts'),
+ rpm.RPMPROB_PKG_INSTALLED: _('package already installed'),
+ rpm.RPMPROB_REQUIRES: _('required package'),
+ rpm.RPMPROB_BADARCH: _('package for incorrect arch'),
+ rpm.RPMPROB_BADOS: _('package for incorrect os'),
+ }
+ uniqueProbs = {}
+ for (descr, (type, mount, need)) in probs:
+ if not uniqueProbs.has_key(type) and probTypes.has_key(type):
+ uniqueProbs[type] = probTypes[type]
+ log.error("error running transaction: %s" %(descr,))
+
+ probString = ', '.join(uniqueProbs.values())
intf.messageWindow(_("Error running transaction"),
("There was an error running your transaction, "
- "probably a disk space problem. For now, "
- "exiting on this although we should diagnose "
- "and then let you go back."))
+ "for the following reason(s): "
+ "%s " % (probString,)))
sys.exit(1)
def doCacheSetup(self):