summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-07-24 23:05:15 +0000
committerJeremy Katz <katzj@redhat.com>2003-07-24 23:05:15 +0000
commitc59f06fb68ca434863214c72ceee0eaebc92f937 (patch)
treeaf5c033dc8a7ec24f9d08446bc4bf2949294c2a1 /fsset.py
parent2e687c5bbc0c07bda97c215be5dbc01c382d705f (diff)
downloadanaconda-c59f06fb68ca434863214c72ceee0eaebc92f937.tar.gz
anaconda-c59f06fb68ca434863214c72ceee0eaebc92f937.tar.xz
anaconda-c59f06fb68ca434863214c72ceee0eaebc92f937.zip
don't let people with duplicate labels continue upgrading (#97364)
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index 7fea782d9..e676b9d1c 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1989,7 +1989,7 @@ def makeDevice(dev):
return device
# XXX fix RAID
-def readFstab (path):
+def readFstab (path, intf = None):
fsset = FileSystemSet()
# first, we look at all the disks on the systems and get any ext2/3
@@ -2001,7 +2001,23 @@ def readFstab (path):
labelToDevice = {}
for device, label in labels.items():
- labelToDevice[label] = device
+ if not labelToDevice.has_key(label):
+ labelToDevice[label] = device
+ elif intf is not None:
+ intf.messageWindow(_("Duplicate Labels"),
+ _("Multiple devices on your system have are "
+ "labelled %s. Labels across devices must be "
+ "unique for your system to function "
+ "properly.\n\n"
+ "Please fix this problem and restart the "
+ "installation process.") %(label,),
+ type="custom", custom_icon="error",
+ custom_buttons=[_("_Reboot")])
+ sys.exit(0)
+ else:
+ log("WARNING!!! Duplicate labels for %s, but no intf so trying "
+ "to continue" %(label,))
+
# mark these labels found on the system as used so the factory
# doesn't give them to another device