def __init__(self, filename): util.trace('BinaryPackage: %s' % filename) super(BinaryPackage, self).__init__() self.filename = filename self.info = filename self.verify_archive_format() info = self.get_pkg_info() self.parse_info(info) self.config = configuration.Configuration(self.BUILD_ARCH, self.BUILD_TOOLCHAIN, self.BUILD_CONFIG == 'debug')
def run_git_cmd(directory, cmd, error_ok=False): cmd = ['git'] + cmd log_verbose('%s' % ' '.join(cmd)) p = subprocess.Popen(cmd, cwd=directory, stderr=subprocess.PIPE, stdout=subprocess.PIPE) stdout, stderr = p.communicate() if not error_ok and p.returncode != 0: if stdout: log(stdout) if stderr: log(stderr) raise Error('git command failed: %s' % cmd) trace('git exited with %d' % p.returncode) return p.returncode
def install(self, force): """Install binary package into toolchain directory.""" util.trace('Installing %s' % self.filename) with util.InstallLock(self.config): self._install(force)