diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-06-10 17:03:39 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-06-10 17:03:39 +0100 |
commit | 776019ae8df349cb35fdeb2c37e2e8561bcad31b (patch) | |
tree | 2ccd9bc3c7d63f9d7fe25dbd7a7593e78cad5543 | |
parent | 63d347425581d57c639c5cfc1879ab556a2327f1 (diff) | |
download | sandboxlib-776019ae8df349cb35fdeb2c37e2e8561bcad31b.tar.gz |
linux_user_chroot: Sort --mount-readonly directories
This should have no effect on behaviour, but makes things slightly more
predictable.
-rw-r--r-- | sandboxlib/linux_user_chroot.py | 4 |
1 files changed, 3 insertions, 1 deletions
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( |