def adequate(chroot_name, target, package_name, analysis):
    with schroot(chroot_name) as chroot:
        chroot.copy(target, "/tmp")

        out, err, ret = chroot.run([
            'apt-get', 'install', '-y', 'adequate'
        ], user='root')

        os.environ['DEBIAN_FRONTEND'] = 'noninteractive'
        out, err, ret = chroot.run([
            'dpkg', '-i',
            "/tmp/%s" % target
        ], user='root', return_codes=(0, 1), preserve_environment=True)

        out, err, ret = chroot.run([
            'apt-get', 'install', '-y', '-f'
        ], user='root', preserve_environment=True)

        out, err, ret = chroot.run(['adequate', package_name])

        failed = False
        for issue in parse_adequate(out.splitlines()):
            failed = True
            analysis.results.append(issue)

        return (analysis, out, failed, None, None)
dataset/ETHPy150Open Debian/debile/debile/slave/runners/adequate.py/adequate/original