image tasks: only bind mount /selinux if it exists

current fedora does not have /selinux on the host if you try to bind mount
a non existant directory the mount fails.
This commit is contained in:
Dennis Gilmore 2015-01-23 13:45:52 -06:00
parent 82a405c794
commit 50c8dd5697

View file

@ -2370,10 +2370,9 @@ class ImageTask(BaseTaskHandler):
"""
# Here we configure mock to bind mount a set of /dev directories
bind_opts = {'dirs' : {
'/dev' : '/dev',
'/selinux' : '/selinux'}
}
bind_opts = {'dirs' : {'/dev' : '/dev',}}
if os.path.exists('/selinux'):
bind_opts['dirs']['/selinux'] = '/selinux'
rootopts = {'install_group': inst_group,
'setup_dns': True,
'repo_id': repoinfo['id'],