-
Notifications
You must be signed in to change notification settings - Fork 15
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
Supp population sources #141
Conversation
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.
run tests |
Related to #137 |
run tests |
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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