Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Install (http://www.linux-archive.org/red-hat-install/)
-   -   Check for and complain about package scriptlet errors (#531599). (http://www.linux-archive.org/red-hat-install/432825-check-complain-about-package-scriptlet-errors-531599-a.html)

Chris Lumens 09-28-2010 02:37 PM

Check for and complain about package scriptlet errors (#531599).
 
We don't get a lot of information to go on from rpm/yum so just do the
best we can. On interactive installs, complain that there was an error
and redirect the user to install.log where the error will have been
logged. On kickstart installs, just log the complaint.
---
yuminstall.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 39e705d..efd3ab8 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -718,7 +718,7 @@ class AnacondaYum(YumSorter):
spaceneeded = {}

try:
- self.runTransaction(cb=cb)
+ rc = self.runTransaction(cb=cb)
except YumBaseError, probs:
# FIXME: we need to actually look at these problems...
probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'),
@@ -767,6 +767,16 @@ class AnacondaYum(YumSorter):
type="custom", custom_icon="error",
custom_buttons=[_("Re_boot")])
sys.exit(1)
+ else:
+ if rc.return_code == 1:
+ msg = _("An error occurred while installing packages. Please "
+ "examine /root/install.log on your installed system for "
+ "detailed information.")
+ log.error(msg)
+
+ if not self.anaconda.isKickstart:
+ intf.messageWindow(_("Error running transaction"),
+ msg, type="warning")

def doMacros(self):
for (key, val) in self.macros.items():
--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

David Cantrell 09-28-2010 02:58 PM

Check for and complain about package scriptlet errors (#531599).
 
Ack.

On Tue, 28 Sep 2010, Chris Lumens wrote:


We don't get a lot of information to go on from rpm/yum so just do the
best we can. On interactive installs, complain that there was an error
and redirect the user to install.log where the error will have been
logged. On kickstart installs, just log the complaint.
---
yuminstall.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 39e705d..efd3ab8 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -718,7 +718,7 @@ class AnacondaYum(YumSorter):
spaceneeded = {}

try:
- self.runTransaction(cb=cb)
+ rc = self.runTransaction(cb=cb)
except YumBaseError, probs:
# FIXME: we need to actually look at these problems...
probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'),
@@ -767,6 +767,16 @@ class AnacondaYum(YumSorter):
type="custom", custom_icon="error",
custom_buttons=[_("Re_boot")])
sys.exit(1)
+ else:
+ if rc.return_code == 1:
+ msg = _("An error occurred while installing packages. Please "
+ "examine /root/install.log on your installed system for "
+ "detailed information.")
+ log.error(msg)
+
+ if not self.anaconda.isKickstart:
+ intf.messageWindow(_("Error running transaction"),
+ msg, type="warning")

def doMacros(self):
for (key, val) in self.macros.items():



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 08:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.