diff options
author | Paul Howarth <paul@city-fan.org> | 2010-08-11 11:53:58 +0100 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2010-08-12 10:56:28 -0500 |
commit | 03cb001e8d3b2d629c879ba723afcd2b187675b2 (patch) | |
tree | 2bcda68d162073df7551dbed78a03330626f027c /py/mock/backend.py | |
parent | 7f9f684f63dc05c7d44547879fcf6e49831bc5c6 (diff) | |
download | mock-03cb001e8d3b2d629c879ba723afcd2b187675b2.tar.gz mock-03cb001e8d3b2d629c879ba723afcd2b187675b2.tar.xz mock-03cb001e8d3b2d629c879ba723afcd2b187675b2.zip |
Retain order of umountCmds
The order of execution of umounts is the reverse of the order of
the mounts, so as to deal with a hierarchy of mounts correctly.
The ordering is reversed by _umountall but was being left in the
reversed state so that the next time _umountall was called, it
attempted to unmount filesystems in the wrong order, leading to
build failures due to being unable to unmount for example /proc
whilst /proc/filesystems was still mounted. This change reverses
the order of umount commands back again before _umountall exits
so as to maintain the ordering.
Signed-off-by: Clark Williams <williams@redhat.com>
Diffstat (limited to 'py/mock/backend.py')
-rw-r--r-- | py/mock/backend.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/mock/backend.py b/py/mock/backend.py index eb97219..d604df6 100644 --- a/py/mock/backend.py +++ b/py/mock/backend.py @@ -638,6 +638,8 @@ class Root(object): for cmd in umountCmds: self.root_log.debug(cmd) mock.util.do(cmd, raiseExc=0, shell=True) + # Reverse the order back again, ready for next time + umountCmds.reverse() decorate(traceLog()) def _yum(self, cmd, returnOutput=0): |