---
pyanaconda/ui/gui/__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 90e0e73..9e15abb 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -128,8 +128,9 @@ class GraphicalUserInterface(UserInterface):
message_type=Gtk.MessageType.ERROR,
buttons=Gtk.ButtonsType.NONE,
message_format=message)
+ dlg.set_decorated(False)
dlg.add_button(_("_Exit Installer"), 0)
-
+
with enlightbox(self._actions[0].window, dlg):
dlg.run()
dlg.destroy()
@@ -141,6 +142,7 @@ class GraphicalUserInterface(UserInterface):
message_type=Gtk.MessageType.QUESTION,
buttons=Gtk.ButtonsType.NONE,
message_format=message)
+ dlg.set_decorated(False)
dlg.add_buttons(_("_No"), 0, _("_Yes"), 1)
dlg.set_default_response(1)
--
1.7.11.2
Show replies by date
We are trying to prevent the user from getting to the hub with a space
error, hence why you can only quit. It's still helpful to catch the
errors just in case something sneaks through later.
---
pyanaconda/packaging/yumpayload.py | 37 ++++++++++++++++++++++++++++---------
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index d12a006..6bf4e8a 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -70,6 +70,7 @@ from pyanaconda import iutil
from pyanaconda.iutil import ProxyString, ProxyStringError
from pyanaconda import isys
from pyanaconda.network import hasActiveNetDev
+from pyanaconda.storage.size import Size
from pyanaconda.image import opticalInstallMedia
from pyanaconda.image import mountImage
@@ -121,7 +122,6 @@ class YumPayload(PackagePayload):
def reset(self, root=None):
""" Reset this instance to its initial (unconfigured) state.
"""
- from pyanaconda.storage.size import Size
# cdrom: install_device.teardown (INSTALL_TREE)
# hd: umount INSTALL_TREE, install_device.teardown (ISO_DIR)
@@ -1066,8 +1066,6 @@ reposdir=%s
return self._space_required
def calculateSpaceNeeds(self):
- from pyanaconda.storage.size import Size
-
# XXX this will only be useful if you've run checkSoftwareSelection
total = 0
with _yum_lock:
@@ -1265,6 +1263,29 @@ reposdir=%s
else:
rpm.addMacro("__file_context_path", "%{nil}")
+ def _transactionErrors(self, errors):
+ spaceNeeded = {}
+ retval = ""
+
+ # RPM can give us a bunch of potential errors, but we really only
+ # care about a handful.
+ for (descr, (ty, mount, need)) in errors:
+ log.error(descr)
+
+ if ty == rpm.RPMPROB_DISKSPACE:
+ spaceNeeded[mount] = need
+
+ # Now that we've found the ones we are interested in, create an
+ # error string to match.
+ if spaceNeeded:
+ retval += _("You need more space on the following "
+ "file systems:\n")
+
+ for (mount, need) in spaceNeeded.items():
+ retval += "%s on %s\n" % (Size(need), mount)
+
+ return retval
+
def install(self):
""" Install the payload. """
from yum.Errors import PackageSackError, RepoError, YumBaseError,
YumRPMTransError
@@ -1310,19 +1331,17 @@ reposdir=%s
try:
self._yum.runTransaction(cb=rpmcb)
except PackageSackError as e:
- log.error("error running transaction: %s" % e)
+ log.error("error [1] running transaction: %s" % e)
exn = PayloadInstallError(str(e))
if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
except YumRPMTransError as e:
- log.error("error running transaction: %s" % e)
- for error in e.errors:
- log.error(error[0])
- exn = PayloadInstallError(str(e))
+ log.error("error [2] running transaction: %s" % e)
+ exn = PayloadInstallError(self._transactionErrors(e.errors))
if errorHandler.cb(exn) == ERROR_RAISE:
raise exn
except YumBaseError as e:
- log.error("error [2] running transaction: %s" % e)
+ log.error("error [3] running transaction: %s" % e)
for error in e.errors:
log.error("%s" % error[0])
exn = PayloadInstallError(str(e))
--
1.7.11.2
We are trying to prevent the user from getting to the hub with a
space
error, hence why you can only quit. It's still helpful to catch the
errors just in case something sneaks through later.
Note: an alternate way to fix this might be to ignore it and fix 873852
instead. I like being thorough here, though.
- Chris
We don't provide you with the chance to do anything anyway.
---
pyanaconda/packaging/yumpayload.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 6bf4e8a..3ce12f7 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1339,7 +1339,8 @@ reposdir=%s
log.error("error [2] running transaction: %s" % e)
exn = PayloadInstallError(self._transactionErrors(e.errors))
if errorHandler.cb(exn) == ERROR_RAISE:
- raise exn
+ progress.send_quit(1)
+ sys.exit(1)
except YumBaseError as e:
log.error("error [3] running transaction: %s" % e)
for error in e.errors:
--
1.7.11.2
Ack to all of these. I'll git-am them to the build.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)