Fails when run from inside a non-pychroot chroot
tlhonmey opened this issue · comments
tlhonmey commented
Running pychroot from within a chroot fails with the following:
# pychroot nvros-base
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/snakeoil/contexts.py", line 84, in __enter__
self.child_setup()
File "/usr/lib64/python2.7/site-packages/pychroot/base.py", line 101, in child_setup
simple_unshare(pid=True, hostname=self.hostname, **kwargs)
File "/usr/lib64/python2.7/site-packages/snakeoil/process/namespaces.py", line 332, in simple_unshare
_mount(None, '/', None, MS_REC | MS_SLAVE)
File "/usr/lib64/python2.7/site-packages/snakeoil/osutils/__init__.py", line 105, in _wrapper
return f(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/snakeoil/osutils/mount.py", line 55, in mount
raise OSError(e, os.strerror(e))
OSError: [Errno 22] Invalid argument
On further testing, it has the same problem if the outer chroot is a pychroot. If this can't be made to work, it would be nice if it at least failed with a sensible error message.
Tim Harder commented
This should be fixed via pkgcore/snakeoil@3737b2b and be in the next snakeoil release.
Tim Harder commented
snakeoil-0.7.1 is out now with the fix, if you have issues let me know.