Skip to content

Commit

Permalink
Merge pull request #1242 from beav/4267
Browse files Browse the repository at this point in the history
use `force_full` when syncing distribution units
  • Loading branch information
dkliban committed Dec 21, 2018
2 parents 46d3b65 + b30b5e2 commit 223df1f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions plugins/pulp_rpm/plugins/importers/yum/parse/treeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,18 @@ def _run(self, tmp_dir):

# determine missing units
missing_units = repo_controller.missing_unit_count(self.repo.repo_id)

force_full = self.parent.config.get('force_full', False)
# Continue only when the distribution has changed.
if len(existing_units) == 1 and \
self.existing_distribution_is_current(existing_units[0], unit) and \
(self.download_deferred or not missing_units):
_logger.info(_('upstream distribution unchanged; skipping'))
(self.download_deferred or not missing_units) and \
not force_full:
_logger.info(_('upstream distribution unchanged and force_full not set; skipping'))
return

_logger.info(_('downloading distribution units'))

# Process the distribution
dist_files, pulp_dist_xml_path = self.process_distribution(tmp_dir)
files.extend(dist_files)
Expand Down

0 comments on commit 223df1f

Please sign in to comment.