summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-04-19 20:58:23 +0000
committerChris Lumens <clumens@redhat.com>2007-04-19 20:58:23 +0000
commitcb1c6610de8f4ad80f765592fbd7450d39635440 (patch)
treec1c0a2eee56fbaac6aee0a92c71473d59010e66f /fsset.py
parentb6a88772b5caabf71befd93f874a128d206fe228 (diff)
downloadanaconda-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.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/fsset.py b/fsset.py
index 7fc3d6a1b..facc18670 100644
--- a/fsset.py
+++ b/fsset.py
@@ -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'