From 776019ae8df349cb35fdeb2c37e2e8561bcad31b Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 10 Jun 2015 17:03:39 +0100 Subject: linux_user_chroot: Sort --mount-readonly directories This should have no effect on behaviour, but makes things slightly more predictable. --- sandboxlib/linux_user_chroot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sandboxlib/linux_user_chroot.py b/sandboxlib/linux_user_chroot.py index 3cf563f..943bde5 100644 --- a/sandboxlib/linux_user_chroot.py +++ b/sandboxlib/linux_user_chroot.py @@ -249,7 +249,9 @@ def process_writable_paths(fs_root, writable_paths): absolute_writable_paths = [ os.path.join(fs_root, path.lstrip('/')) for path in writable_paths] - for d in invert_paths(os.walk(fs_root), absolute_writable_paths): + readonly_paths = invert_paths( + os.walk(fs_root), absolute_writable_paths) + for d in sorted(readonly_paths): if not os.path.islink(d): rel_path = '/' + os.path.relpath(d, fs_root) extra_linux_user_chroot_args.extend( -- cgit v1.2.1