summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-07-18 20:15:09 +0000
committerChris Lumens <clumens@redhat.com>2007-07-18 20:15:09 +0000
commitdd4f6647d364678d8d0d60e168e3876ef172b84f (patch)
tree76a6bd0e75f79491ae5b192988ba9bb8a511ec28
parentc2c32c53faf9ccad3be094992cd2dcde202f9e5b (diff)
downloadanaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.tar.gz
anaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.tar.xz
anaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.zip
Improve error reporting when trying to mount swap partitions specified by
device name instead of label (#248558).
-rw-r--r--ChangeLog4
-rw-r--r--fsset.py37
2 files changed, 21 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 4db361506..66211ead5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
2007-07-18 Chris Lumens <clumens@redhat.com>
+ * fsset.py (FileSystemSet.turnOnSwap): Improve error reporting when
+ trying to mount swap partitions specified by device name instead of
+ label (#248558).
+
* partitions.py (Partitions.hasGptLabel): Fix typo.
* partitions.py (turnOnFilesystems): Remove call to refreshDevices.
diff --git a/fsset.py b/fsset.py
index 771089aa3..eea810698 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1536,27 +1536,24 @@ MAILADDR root
sys.exit(0)
except SystemError, (num, msg):
if self.messageWindow:
- if upgrading:
- self.messageWindow(_("Error"),
- _("Error enabling swap device "
- "%s: %s\n\n"
- "The /etc/fstab on your "
- "upgrade partition does not "
- "reference a valid swap "
- "partition.\n\n"
- "Press OK to exit the "
- "installer.")
- % (entry.device.getDevice(), msg))
+ if upgrading and not entry.getLabel():
+ err = _("Error enabling swap device %s: %s\n\n"
+ "Devices in /etc/fstab should be specified "
+ "by label, not by device name.\n\nPress "
+ "OK to exit the installer.") % (entry.device.getDevice(), msg)
+ elif upgrading:
+ err = _("Error enabling swap device %s: %s\n\n"
+ "The /etc/fstab on your upgrade partition "
+ "does not reference a valid swap "
+ "partition.\n\nPress OK to exit the "
+ "installer") % (entry.device.getDevice(), msg)
else:
- self.messageWindow(_("Error"),
- _("Error enabling swap device "
- "%s: %s\n\n"
- "This most likely means this "
- "swap partition has not been "
- "initialized.\n\n"
- "Press OK to exit the "
- "installer.")
- % (entry.device.getDevice(), msg))
+ err = _("Error enabling swap device %s: %s\n\n"
+ "This most likely means this swap "
+ "partition has not been initialized.\n\n"
+ "Press OK to exit the installer.") % (entry.device.getDevice(), msg)
+
+ self.messageWindow(_("Error"), err)
sys.exit(0)
def labelEntry(self, entry, chroot):