diff options
author | Chris Lumens <clumens@redhat.com> | 2007-04-19 20:58:23 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-04-19 20:58:23 +0000 |
commit | cb1c6610de8f4ad80f765592fbd7450d39635440 (patch) | |
tree | c1c0a2eee56fbaac6aee0a92c71473d59010e66f /fsset.py | |
parent | b6a88772b5caabf71befd93f874a128d206fe228 (diff) | |
download | anaconda-cb1c6610de8f4ad80f765592fbd7450d39635440.tar.gz anaconda-cb1c6610de8f4ad80f765592fbd7450d39635440.tar.xz anaconda-cb1c6610de8f4ad80f765592fbd7450d39635440.zip |
Smarten up the entry adding code to not duplicate pseudofilesystem entries
(#236477).
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -93,7 +93,7 @@ def getUsableLinuxFs(): return rc def devify(device): - if device == "proc" or device == "devpts": + if device in ["proc", "devpts", "sysfs", "tmpfs"]: return device elif device == "sys": return "sysfs" @@ -1113,10 +1113,12 @@ class FileSystemSet: else: return False - # remove preexisting duplicate entries + # Remove preexisting duplicate entries - pseudo filesystems are + # duplicate if they have the same filesystem type as an existing one. + # Otherwise, they have to have the same device and mount point + # (required to check for bind mounts). for existing in self.entries: - if (existing.device.getDevice() == newEntry.device.getDevice() - and existing.mountpoint == newEntry.mountpoint): + if (isinstance (newEntry.fsystem, PsudoFileSystem) and existing.fsystem.getName() == newEntry.fsystem.getName()) or (existing.device.getDevice() == newEntry.device.getDevice() and existing.mountpoint == newEntry.mountpoint): self.remove(existing) # XXX debuggin' |