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

repo: Improve *.repo config path ordering to fix a comps merging issue #1734

Merged

Conversation

dmach
Copy link

@dmach dmach commented Feb 23, 2021

Remove the '.repo' suffix to exclude it from the sort key.
Also split the paths into lists to exclude '/' from the sort key.

=changelog=
msg: Improve repo config path ordering to fix a comps merging issue
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1928181

@pep8speaks
Copy link

pep8speaks commented Feb 23, 2021

Hello @dmach! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-02-23 17:52:29 UTC

Copy link
Member

@m-blaha m-blaha left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM. Consider also fixing the PEP8 issues.

dnf/util.py Outdated Show resolved Hide resolved
@m-blaha
Copy link
Member

m-blaha commented Feb 23, 2021

Also I think the comps merging order is worth the CI stack test.

@dmach
Copy link
Author

dmach commented Feb 23, 2021

Also I think the comps merging order is worth the CI stack test.

rpm-software-management/ci-dnf-stack#963

Remove the '.repo' suffix to exclude it from the sort key.
Also split the paths into lists to exclude '/' from the sort key.

=changelog=
msg: Improve repo config path ordering to fix a comps merging issue
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1928181
@kparal
Copy link

kparal commented Feb 25, 2021

This patch fixes the original problem in anaconda:
https://bugzilla.redhat.com/show_bug.cgi?id=1928181#c14
Thanks.

@@ -42,8 +43,16 @@ def __iter__(self):
yield r

# read .repo files from directories specified by conf.reposdir
for repofn in (repofn for reposdir in self.conf.reposdir
for repofn in sorted(glob.glob('{}/*.repo'.format(reposdir)))):
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for rewriting this! I really hate generators with multiple nested for cycles in them.

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.

4 participants