From 19335ebcc032b255c23d7bb165a0baceaa7890b5 Mon Sep 17 00:00:00 2001 From: Pradeep Kilambi Date: Thu, 29 Nov 2012 09:51:52 -0500 Subject: [PATCH] 869099 - fix to the plugin progress callback so delta rpm progress doesnt override rpm progress --- .../yum_distributor/distributor.py | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/pulp_rpm/plugins/distributors/yum_distributor/distributor.py b/pulp_rpm/plugins/distributors/yum_distributor/distributor.py index 56b75be40..28d8d5dde 100644 --- a/pulp_rpm/plugins/distributors/yum_distributor/distributor.py +++ b/pulp_rpm/plugins/distributors/yum_distributor/distributor.py @@ -387,28 +387,23 @@ def progress_callback(type_id, status): return publish_conduit.build_failure_report(summary, details) skip_list = config.get('skip') or [] # Determine Content in this repo - rpm_units = [] - rpm_errors = [] + pkg_units = [] + pkg_errors = [] if 'rpm' not in skip_list: for type_id in [TYPE_ID_RPM, TYPE_ID_SRPM]: criteria = UnitAssociationCriteria(type_ids=type_id, unit_fields=['id', 'name', 'version', 'release', 'arch', 'epoch', '_storage_path', "checksum", "checksumtype" ]) - rpm_units += publish_conduit.get_units(criteria=criteria) + pkg_units += publish_conduit.get_units(criteria=criteria) + drpm_units = [] + if 'drpm' not in skip_list: + criteria = UnitAssociationCriteria(type_ids=TYPE_ID_DRPM) + drpm_units = publish_conduit.get_units(criteria=criteria) + pkg_units += drpm_units # Create symlinks under repo.working_dir - rpm_status, rpm_errors = self.handle_symlinks(rpm_units, repo.working_dir, progress_callback) - if not rpm_status: - _LOG.error("Unable to publish %s items" % (len(rpm_errors))) - drpm_units = [] - drpm_errors = [] - if 'drpm' not in skip_list: - criteria = UnitAssociationCriteria(type_ids=TYPE_ID_DRPM) - drpm_units = publish_conduit.get_units(criteria=criteria) - # Create symlinks under repo.working_dir - drpm_status, drpm_errors = self.handle_symlinks(drpm_units, repo.working_dir, progress_callback) - if not drpm_status: - _LOG.error("Unable to publish %s items" % (len(drpm_errors))) - pkg_errors = rpm_errors + drpm_errors - pkg_units = rpm_units + drpm_units + pkg_status, pkg_errors = self.handle_symlinks(pkg_units, repo.working_dir, progress_callback) + if not pkg_status: + _LOG.error("Unable to publish %s items" % (len(pkg_errors))) + distro_errors = [] distro_units = [] if 'distribution' not in skip_list: