[master 4/4] Check the chrooted path against mountsCache
bcl
installerbot-noreply at redhat.com
Tue Apr 7 19:22:21 UTC 2015
From: "Brian C. Lane" <bcl at redhat.com>
Otherwise it won't mount things.
---
blivet/formats/fs.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 8142081..1320974 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -642,10 +642,6 @@ def mount(self, options="", chroot="/", mountpoint=None):
if not mountpoint:
raise FSError("no mountpoint given")
- # Is something is already mounted at this path?
- if mountsCache.isMounted(mountpoint):
- return
-
if not isinstance(self, NoDevFS) and not os.path.exists(self.device):
raise FSError("device %s does not exist" % self.device)
@@ -656,6 +652,11 @@ def mount(self, options="", chroot="/", mountpoint=None):
#mountpoint = os.path.join(chroot, mountpoint)
chrootedMountpoint = os.path.normpath("%s/%s" % (chroot, mountpoint))
+ # Is something is already mounted at this path?
+ if mountsCache.isMounted(chrootedMountpoint):
+ log.debug("BCL: %s is already mounted, not remounting it. %s", chrootedMountpoint, self.device)
+ return
+
# passed in options override default options
if not options or not isinstance(options, str):
options = self.options
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/836b9af1f2ba19ed4494d34dc0aaa9f2613a92f1
More information about the anaconda-patches
mailing list