def get_files_rpms(self): if self._rpm_files: return self._rpm_files self.build() rpms = glob.glob(self.get_mock_dir()+ '/*.rpm') rpm_files = {} for rpm in rpms: if rpm.endswith('.src.rpm'): continue cmd = 'rpm -qpl %s' % rpm rc = self._run_cmd(cmd) rpm_files[os.path.basename(rpm)] = rc.split('\n') self._rpm_files = rpm_files return rpm_files
def get_files_rpms(self): if self._rpm_files: return self._rpm_files self.build() rpms = glob.glob(self.get_mock_dir() + '/*.rpm') rpm_files = {} for rpm in rpms: if rpm.endswith('.src.rpm'): continue cmd = 'rpm -qpl %s' % rpm rc = self._run_cmd(cmd) rpm_files[os.path.basename(rpm)] = rc.split('\n') self._rpm_files = rpm_files return rpm_files
def get_files_rpms(self): """ Generate the list files contained in RPMs generated by the mock build """ if self._rpm_files: return self._rpm_files self.build() rpms = glob.glob(self.get_mock_dir() + '/*.rpm') rpm_files = {} for rpm in rpms: if rpm.endswith('.src.rpm'): continue cmd = 'rpm -qpl %s' % rpm rc = self._run_cmd(cmd) rpm_files[os.path.basename(rpm)] = rc.split('\n') self._rpm_files = rpm_files return rpm_files
def _fetch_from_brew(self): brew_nvr = "%s.%s" % (self.build_tag, self.dist_tag) debug("Brew NVR: %s" % brew_nvr) os.chdir(self.rpmbuild_dir) run_command("brew download-build %s" % brew_nvr) # Wipe out the src rpm for now: run_command("rm *.src.rpm") # Copy everything brew downloaded out to /tmp/tito: files = os.listdir(self.rpmbuild_dir) run_command("cp -v %s/*.rpm %s" % (self.rpmbuild_dir, self.rpmbuild_basedir)) print info_out("Wrote:") for rpm in files: # Just incase anything slips into the build dir: if not rpm.endswith(".rpm"): continue rpm_path = os.path.join(self.rpmbuild_basedir, rpm) print(" %s" % rpm_path) self.artifacts.append(rpm_path) print
def get_files_rpms(self): """ Generate the list files contained in RPMs generated by the mock build or present using --prebuilt """ if self._rpm_files: return self._rpm_files if Settings.prebuilt: rpms = glob.glob('*.rpm') hdr = "Using local rpms: " sep = '\n' + ' ' * len(hdr) print hdr + sep.join(rpms) else: self.build() rpms = glob.glob(self.get_mock_dir() + '/*.rpm') rpm_files = {} for rpm in rpms: if rpm.endswith('.src.rpm'): continue cmd = 'rpm -qpl %s' % rpm rc = self._run_cmd(cmd) rpm_files[os.path.basename(rpm)] = rc.split('\n') self._rpm_files = rpm_files return rpm_files