From cb25594be8e046a82ddb2ef60ca76f98a1293185 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 8 Oct 2010 12:02:14 -0400 Subject: srpm-builder: Uniquify srpms to build if both git and upstream are updated Previously we'd try to build two srpms if both upstream and fedora git changed. --- rpmci/rpmci_srpm_builder_main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpmci/rpmci_srpm_builder_main.py b/rpmci/rpmci_srpm_builder_main.py index 724bfbd..9bc260a 100644 --- a/rpmci/rpmci_srpm_builder_main.py +++ b/rpmci/rpmci_srpm_builder_main.py @@ -102,12 +102,12 @@ class SRPMBuilder(object): logging.debug("Creating SRPMs for VCS urls: %r" % (updated_vcs_urls, )) work_dir = tempfile.mkdtemp('.tmp', 'srpm-builder') - updated_srpms = [] - updated_srpm_names = [] + updated_srpms = set() + updated_srpm_names = set() for url in updated_vcs_urls: srpm = self._create_srpm_for_updated_vcs_url(work_dir, url) - updated_srpms.append(srpm) - updated_srpm_names.append(rpmutils.get_rpm_name(os.path.basename(srpm))) + updated_srpms.add(srpm) + updated_srpm_names.add(rpmutils.get_rpm_name(os.path.basename(srpm))) commitid = self._srcrepo.commit_sync(updated_srpms) logging.info("New repository revision %d updates SRPMs=%r" % (commitid, updated_srpm_names)) shutil.rmtree(work_dir) -- cgit