def install_linux_deps(context, pkgs_ubuntu, pkgs_fedora, pkgs_void, force):
    install = False
    pkgs = []
    if (context.distro in ['Ubuntu', 'Debian GNU/Linux']):
        command = ['apt-get', 'install']
        pkgs = pkgs_ubuntu
        if (subprocess.call((['dpkg', '-s'] + pkgs), stdout=PIPE, stderr=PIPE) != 0):
            install = True
    elif (context.distro in ['CentOS', 'CentOS Linux', 'Fedora']):
        installed_pkgs = str(subprocess.check_output(['rpm', '-qa'])).replace('\n', '|')
        pkgs = pkgs_fedora
        for p in pkgs:
            command = ['dnf', 'install']
            if ('|{}'.format(p) not in installed_pkgs):
                install = True
                break
    elif (context.distro == 'void'):
        installed_pkgs = str(subprocess.check_output(['xbps-query', '-l']))
        pkgs = pkgs_void
        for p in pkgs:
            command = ['xbps-install', '-A']
            if ('ii {}-'.format(p) not in installed_pkgs):
                install = force = True
                break
    if install:
        print('Installing missing dependencies...')
        run_as_root((command + pkgs), force)
    return install
def install_linux_deps(context, pkgs_ubuntu, pkgs_fedora, pkgs_void, force):
    install = False
    pkgs = []
    if (context.distro in ['Ubuntu', 'Debian GNU/Linux']):
        command = ['apt-get', 'install']
        pkgs = pkgs_ubuntu
        if (subprocess.call((['dpkg', '-s'] + pkgs), stdout=PIPE, stderr=PIPE) != 0):
            install = True
    elif (context.distro in ['CentOS', 'CentOS Linux', 'Fedora']):
        installed_pkgs = str(subprocess.check_output(['rpm', '-qa'])).replace('\n', '|')
        pkgs = pkgs_fedora
        for p in pkgs:
            command = ['dnf', 'install']
            if ('|{}'.format(p) not in installed_pkgs):
                install = True
                break
    elif (context.distro == 'void'):
        installed_pkgs = str(subprocess.check_output(['xbps-query', '-l']))
        pkgs = pkgs_void
        for p in pkgs:
            command = ['xbps-install', '-A']
            if ('ii {}-'.format(p) not in installed_pkgs):
                install = force = True
                break
    if install:
        print('Installing missing dependencies...')
        run_as_root((command + pkgs), force)
    return install