~larryprice/libertine/snapcraft-remove-empty-plugs

« back to all changes in this revision

Viewing changes to python/libertine/ChrootContainer.py

  • Committer: Larry Price
  • Date: 2016-12-07 19:05:37 UTC
  • mfrom: (302.2.46 devel)
  • Revision ID: larry.price@canonical.com-20161207190537-46vubww9vcfx8l1x
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        self._window_manager = None
54
54
        # FIXME: Disabling seccomp is a temporary measure until we fully understand why we need
55
55
        #        it or figure out when we need it.
56
 
        environ['PROOT_NO_SECCOMP'] = '1'
 
56
        os.environ['PROOT_NO_SECCOMP'] = '1'
57
57
        os.environ['FAKECHROOT_CMD_SUBST'] = '$FAKECHROOT_CMD_SUBST:/usr/bin/chfn=/bin/true'
58
58
        os.environ['DEBIAN_FRONTEND'] = 'noninteractive'
59
59
 
167
167
    def _build_fakechroot_command(self):
168
168
        cmd = 'fakechroot'
169
169
 
170
 
        if 'SNAP' in os.environ:
 
170
        if utils.is_snap_environment():
171
171
            cmd = "{} -b {}/usr/sbin".format(cmd, os.environ['SNAP'])
172
172
 
173
173
        return cmd
198
198
                                            ContainersConfig().get_container_bind_mounts(self.container_id))
199
199
        for user_dir in utils.generate_binding_directories(mounts, home_path):
200
200
            user_dir_path = os.path.join(home_path, user_dir[1])
201
 
            bind_mounts += " -b %s:%s" % (user_dir[0], user_dir_path)
 
201
            bind_mounts += " -b \"%s:%s\"" % (user_dir[0], user_dir_path)
202
202
 
203
203
        proot_cmd += bind_mounts
204
204