Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supp population sources #141

Merged
merged 8 commits into from
Oct 22, 2019

Conversation

rbikar
Copy link
Member

@rbikar rbikar commented Oct 16, 2019

This change adds support for ubi repositories population
from more that one input repo.

Repo note 'population_sources' is here used for
getting sources, if it's not available, fallback
to manual finding of input repositories.

This change also refactors usage of 'ubi_population' repo note
that enables population of given ubi repositories

This change adds support for ubi repositories population
from more that one input repo.

Repo note 'population_sources' is here used for
getting sources, if it's not available, fallback
to manual finding of input repositories.

This change also refactors usage of 'ubi_population' repo note
that enables population of given ubi repositories.
@rbikar
Copy link
Member Author

rbikar commented Oct 16, 2019

run tests

@rbikar rbikar requested a review from a team October 16, 2019 12:44
@rbikar
Copy link
Member Author

rbikar commented Oct 16, 2019

Related to #137

negillett
negillett previously approved these changes Oct 16, 2019
tests/test_pulp.py Outdated Show resolved Hide resolved
ubipop/__init__.py Outdated Show resolved Hide resolved
@negillett negillett requested a review from a team October 16, 2019 15:09
@rbikar
Copy link
Member Author

rbikar commented Oct 17, 2019

run tests

@negillett negillett requested a review from a team October 17, 2019 13:19
def _get_population_sources(self, repo, input_cs):
src_repos = []
if repo.population_sources:
fts = [self._executor.submit(self.pulp.search_repo_by_id, r)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt' better to search only once for all the repos in one call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be refactor within #136


for in_repo_rpm in self.repos.in_repos.rpm:
res = self.pulp.search_rpms(in_repo_rpm, filename=rpm_filename)
if res:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

self.name = name
self.filename = filename
self.sourcerpm_filename = sourcerpm_filename
self.is_modular = is_modular
# return name, ver, rel, epoch, arch
_, self.version, self.release, self.epoch, _ = split_filename(self.filename)
self.evr_tuple = (self.epoch, self.version, self.release)
self.associate_source_repo_id = src_repo_id
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather chose in_repo_id or source_repo_id than associate_source_repo_id. Note that in the future it would make sense to replace this model with pubtools.pulplib.model.unit.rpm.RpmUnit. In the light of that, it would rather make sense to have attribute stating that unit is in some repository not necessarily designed for association

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replacing with pubtools.pulplib.model.unit.rpm.RpmUnit is already planned, so I'll leave it now as it is.

@rbikar rbikar merged commit f7ef877 into release-engineering:master Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants