def _install_package_source(self, name, version):
        build_vars = " ".join(self.resource.build_vars)
        run_check_call = lambda s, **kw: check_call(s, shell = True, stdout=PIPE, stderr=STDOUT, **kw)
        pkgdir = tempfile.mkdtemp(suffix = name)

        try:
            run_check_call("DEBIAN_FRONTEND=noninteractive apt-get -q -y install fakeroot")
            run_check_call("DEBIAN_FRONTEND=noninteractive apt-get -q -y build-dep %s=%s" % (name, version))
            run_check_call("DEBIAN_FRONTEND=noninteractive apt-get -q -y source %s=%s" % (name, version), cwd = pkgdir)

            try:
                builddir = [p for p in glob.iglob("%s/%s*" % (pkgdir, name)) if os.path.isdir(p)][0]
            except IndexError:
                raise Fail("Couldn't install %s from source: apt-get source created an unfamiliar directory structure." % name)

            run_check_call(build_vars % "%s fakeroot debian/rules binary > /dev/null", cwd = builddir)

            # NOTE: I can't figure out why this call returns non-zero sometimes, though everything seems to work.
            # Just ignoring checking for now.
            try:
                run_check_call("dpkg -i *.deb > /dev/null", cwd = pkgdir)
            except CalledProcessError:
                pass
        finally:
            shutil.rmtree(pkgdir)

        return True
dataset/ETHPy150Open samuel/kokki/kokki/providers/package/apt.py/DebianAptProvider._install_package_source/swapped operands of `%`