summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-10-29 18:28:41 (GMT)
committerRichard Maw <richard.maw@gmail.com>2014-10-29 18:28:41 (GMT)
commit592d57835516ffb3701266fedaddd38747fc05fc (patch)
tree7eeca0cd575af98b727c07db03e024700448083f
parent68b0d0c34f1752371b83866b1f4556557023ba64 (diff)
downloadmorph-baserock/richardmaw-os/unify-namespace-logic.tar.gz
stagingarea: Remove vestigial pre-command mounting logicbaserock/richardmaw-os/unify-namespace-logic
-rw-r--r--morphlib/stagingarea.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index a22753c..af24935 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -45,7 +45,6 @@ class StagingArea(object):
self.dirname = dirname
self.builddirname = None
self.destdirname = None
- self.mounted = []
self._bind_readonly_mount = None
self.use_chroot = use_chroot
@@ -224,23 +223,6 @@ class StagingArea(object):
os.makedirs(ccache_destdir)
return ccache_repodir
- def do_mounts(self, setup_mounts): # pragma: no cover
- if not setup_mounts:
- return
- for mount_point, mount_type, source in self.to_mount:
- logging.debug('Mounting %s in staging area' % mount_point)
- path = os.path.join(self.dirname, mount_point)
- if not os.path.exists(path):
- os.makedirs(path)
- morphlib.fsutils.mount(self._app.runcmd, source, path, mount_type)
- self.mounted.append(path)
- return
-
- def do_unmounts(self): # pragma: no cover
- for path in reversed(self.mounted):
- logging.debug('Unmounting %s in staging area' % path)
- morphlib.fsutils.unmount(self._app.runcmd, path)
-
def chroot_open(self, source, setup_mounts): # pragma: no cover
'''Setup staging area for use as a chroot.'''
@@ -251,8 +233,6 @@ class StagingArea(object):
self.builddirname = builddir
self.destdirname = destdir
- self.do_mounts(setup_mounts)
-
return builddir, destdir
def chroot_close(self): # pragma: no cover
@@ -261,8 +241,8 @@ class StagingArea(object):
This should be called after the staging area is no longer needed.
'''
-
- self.do_unmounts()
+ # No cleanup is currently required
+ pass
def runcmd(self, argv, **kwargs): # pragma: no cover
'''Run a command in a chroot in the staging area.'''