From 03cb001e8d3b2d629c879ba723afcd2b187675b2 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 11 Aug 2010 11:53:58 +0100 Subject: 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 --- py/mock/backend.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit