From 592d57835516ffb3701266fedaddd38747fc05fc Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 29 Oct 2014 18:28:41 +0000 Subject: stagingarea: Remove vestigial pre-command mounting logic --- morphlib/stagingarea.py | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py index a22753ca..af24935d 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.''' -- cgit v1.2.1