diff options
author | Colin Walters <walters@verbum.org> | 2010-10-08 12:02:14 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-10-08 12:02:14 -0400 |
commit | cb25594be8e046a82ddb2ef60ca76f98a1293185 (patch) | |
tree | 12f0405ef7657156067d1c63af6842d5bca74d77 /rpmci | |
parent | a743ac10f62be7582bae8ad23133685b4f98c6a8 (diff) | |
download | rpmci-cb25594be8e046a82ddb2ef60ca76f98a1293185.tar.gz rpmci-cb25594be8e046a82ddb2ef60ca76f98a1293185.tar.xz rpmci-cb25594be8e046a82ddb2ef60ca76f98a1293185.zip |
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.
Diffstat (limited to 'rpmci')
-rw-r--r-- | rpmci/rpmci_srpm_builder_main.py | 8 |
1 files 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) |